/* Check that overloaded builtins still error when not in SFINAE context. */ // { dg-do compile { target c++17 } } #include /* Checks performed here: Fully specified and invalid function errors before SFINAE happens. */ template struct is_available : std::false_type { }; /* Should be error here because of the fully specified (and invalid) builtin call. */ /* { dg-error "template argument 2 is invalid" "" { target *-*-* } .+5 } */ /* { dg-error "template argument 1 is invalid" "" { target *-*-* } .+4 } */ /* { dg-error "too few arguments to function" "" { target *-*-* } .+3 } */ template struct is_available< T, std::void_t> : std::true_type { }; /* Should be error here because of the fully specified (and invalid) builtin call. */ /* { dg-error "template argument 2 is invalid" "" { target *-*-* } .+5 } */ /* { dg-error "template argument 1 is invalid" "" { target *-*-* } .+4 } */ /* { dg-error "operand type 'float' is incompatible" "" { target *-*-* } .+3 } */ template struct is_available< T, std::void_t> : std::true_type { };