view gcc/testsuite/g++.dg/template/spec41.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

// PR c++/94255 - crash with template spec in different namespace.
// { dg-do compile { target c++11 } }

namespace N {
  class S {
    template <typename> struct foo;
  };
  namespace M {
    using S = ::N::S;
  }
}

namespace N {
  namespace M {
    template <> struct S::foo<int> {}; // { dg-error "specialization of" }
  }
}