// P0466R5 // { dg-do compile { target c++20 } } namespace std { template struct integral_constant { static constexpr T value = v; }; template struct is_layout_compatible; template struct is_layout_compatible : public integral_constant { }; template inline constexpr bool is_layout_compatible_v = __is_layout_compatible (T, U); } // { dg-error "invalid use of incomplete type 'struct W'" "" { target *-*-* } .-2 } // { dg-error "invalid use of incomplete type 'struct \[XY]'" "" { target *-*-* } .-3 } // { dg-error "invalid use of incomplete type 'struct Z'" "" { target *-*-* } .-4 } struct W; struct X; struct Y; struct Z; struct A {}; auto a = std::is_layout_compatible_v; auto b = std::is_layout_compatible_v; auto c = std::is_layout_compatible_v;