https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67704

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
From Bug 89301:

The following code compiles however it should not:

template<bool condition, typename T = void>
    requires(condition)
using enable_if_t = T;

template<typename T, typename = enable_if_t<sizeof(T) < 0>>
void foo();

void test() {
    foo<int>();
}


Slightly changed example also compiles on GCC (but fails to compile on Clang):

template<bool condition, typename T = void>
    requires(condition)
using enable_if_t = T;

template<typename T>
enable_if_t<sizeof(T) < 0> foo();

void test() {
    foo<int>();
}

Reply via email to