The following code seems reasonable, but doesn't work on two major compilers
#include <type_traits>
template<template<class> class Tmp>
struct S{
template<class T>
using tmp_t = Tmp<T>;
static_assert(std::is_same_v< S<tmp_t>, S<Tmp> >,
"Not same?? How come?");
};
template<class> struct Dummy{};
template struct S<Dummy>;
gcc starting with 7.1 compiles alright ( https://godbolt.org/z/DjAcgP )
clang ( https://godbolt.org/z/ewBbZJ )
and
msvc ( https://godbolt.org/z/6ZmQwj )
fail to do so
Is this code standard conformant?
See Question&Answers more detail:os