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

--- Comment #9 from Bo Wang <wangbopku15 at gmail dot com> ---
I have tried another case that has no default arguments. This one also be
accepted. We can find that `T::unknown` is used without type-check.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
template<typename T> void f() {
    struct S {  void g() noexcept(T::unknown); };
}
template void f<int>();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Godbolt link is here: https://godbolt.org/z/qY6bajaWE

Reply via email to