[Bug c++/65157] Unable to define a static template member function of a nested class as a friend of a sibling class.
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Tue Nov 21 23:05:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65157
Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard-gccbugzilla@metafoo
| |.co.uk
--- Comment #2 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
Clang is wrong; lookup for B::Create should fail because B is a dependent type,
which is what happens in GCC and EDG. Adding this before 'main' crashes Clang:
template<> class A<int>::B {};
A<int>::C<int> c;
(Internally, Clang is marking the friend declaration as invalid, but failing to
actually produce a corresponding diagnostic.)
Filed as bugs.llvm.org/PR35377.
More information about the Gcc-bugs
mailing list