// PR c++/97518 // { dg-do compile { target c++17 } } template struct is_same { static constexpr bool value = false; }; template struct is_same { static constexpr bool value = true; }; template using some_metafunction_t = T; template void foo(T ) { using X = T*; using Y = some_metafunction_t; static_assert(is_same::value); // { dg-error "static assertion failed" } // { dg-message {.is_same::value. evaluates to false} "" { target *-*-* } .-1 } static_assert(is_same::value, "foo"); // { dg-error "static assertion failed: foo" } // { dg-message {.is_same::value. evaluates to false} "" { target *-*-* } .-1 } static_assert(is_same::value && is_same::value); // { dg-error "static assertion failed" } // { dg-message {.is_same::value. evaluates to false} "" { target *-*-* } .-1 } static_assert(is_same::value && is_same::value); // { dg-error "static assertion failed" } // { dg-message {.is_same::value. evaluates to false} "" { target *-*-* } .-1 } static_assert(is_same::value && is_same::value && is_same::value); // { dg-error "static assertion failed" } // { dg-message {.is_same::value. evaluates to false} "" { target *-*-* } .-1 } } void bar() { foo(0); }