[Bug c++/86501] shadow template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86501 --- Comment #3 from Andrew Pinski --- GCC, ICC and MSVC all accept this code.
[Bug c++/86501] shadow template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86501 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-06-11 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- EDG warns: "86501.cc", line 6: warning: declaration of "V" hides template parameter template < int > friend struct V; ^
[Bug c++/86501] shadow template parameter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86501 Richard Smith changed: What|Removed |Added CC||richard-gccbugzilla@metafoo ||.co.uk --- Comment #2 from Richard Smith --- I think EDG and Clang are wrong here and GCC is right. The template friend declaration introduces V into the global namespace, so it is not "redeclared within its scope" (per [temp.local]p6).