Compiler version and platform:
Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.098 Build 20160721
According to the C++ standard, it is illegal to have a declaration that shadows a template parameter.
$ icc -c small.cpp $ $ g++-6.2 -c small.cpp small.cpp:3:7: error: declaration of ‘int A<T>::T’ shadows template parameter int T; ^ small.cpp:1:12: note: template parameter ‘T’ declared here template < int T > struct A ^~~ $ clang++-3.8 -c small.cpp small.cpp:3:7: error: declaration of 'T' shadows template parameter int T; ^ small.cpp:1:16: note: template parameter is declared here template < int T > struct A ^ 1 error generated. $ $ cat small.cpp template < int T > struct A { int T; }; $