https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78065
Bug ID: 78065 Summary: incorrect behavior with std::is_same with nested class in a template class Product: gcc Version: 6.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jeanmichael.celerier at gmail dot com Target Milestone: --- In this code, the first static_assert compiles with g++ (and also clang, but not MSVC) : #include <type_traits> template<typename T> struct foo { using sub = struct some_struct; }; template<typename T> struct bar { using sub = struct some_struct { }; }; int main() { static_assert(std::is_same<foo<int>::sub, foo<double>::sub>::value, "should not pass"); static_assert(std::is_same<bar<int>::sub, bar<double>::sub>::value, "should not pass"); } The second does (correctly, in my opinion) not.