-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
The second static assert in the following trivial example code fails due to incorrect class specialization being selected:
template <template <typename...> class, class>
struct match_class_specialization
{
enum { matches = 0 };
};
template <template <typename...> class Type, typename... Ts>
struct match_class_specialization<Type, Type<Ts...>>
{
enum { matches = 1 };
};
template <typename...> struct my_type {};
static_assert(match_class_specialization<my_type, my_type<int, int>>{}.matches);
template <typename... Ts> using my_type_alias = my_type<Ts...>;
static_assert(match_class_specialization<my_type_alias, my_type<int, int>>{}.matches);
int main() {}This compiles fine in GCC.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue