[Bug c++/68170] Declaring friend template class template in C++1z produces error: specialization of ‘template?=<class T>=?UTF-8?Q? class A’ must appear at namespace
mohammad.nabil.h at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 3 23:04:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68170
--- Comment #1 from Mohammad Alaggan <mohammad.nabil.h at gmail dot com> ---
In gcc-6-20151101, the attached example compiles correctly. However, the same
problem manifests in this example:
// { dg-do compile }
// { dg-options "-std=c++1z" }
template<typename T>
concept bool C() { return __is_class(T); }
template< typename T >
class A
{
};
template<C R>
class A<R>
{
template< typename X >
friend class A;
};
template<>
class A< int >
{
template< typename X >
friend class A;
};
More information about the Gcc-bugs
mailing list