[Bug c++/111314] Can not deduct parameter pack as a single type

2023-09-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111314

--- Comment #2 from Andrew Pinski  ---
If change DynamicType to a variable length template, then it works; that is:
template  class, typename...>
struct DynamicType {};

[Bug c++/111314] Can not deduct parameter pack as a single type

2023-09-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111314

--- Comment #1 from Andrew Pinski  ---
Reduced testcase:
template 
struct Template1 {};

template  class, typename>
struct DynamicType {};

template 
struct is_dynamic_type
{ static constexpr bool value = false; };

template  class Template, typename... Ts>
struct is_dynamic_type>
{ static constexpr bool value = true; };

// This fails:
static_assert(is_dynamic_type>::value, "");