/* Check that overloaded builtins can be used in templates with SFINAE. */ // { dg-do compile { target c++17 } } /* Checks performed here: Parameters without a pointer where it should be. */ #define SFINAE_TYPE_CHECK(NAME, PARAMS, NONPOINTER_PARAMS) \ template \ struct is_##NAME##_available : std::false_type {}; \ template \ struct is_##NAME##_available> \ : std::true_type {}; /* Everything fails with pointer to non-pointer mismatch. */ #define MAKE_ATOMIC_ASSERT(NAME, TYPE, SUCCESS) \ static_assert(is_##NAME##_available::value == false); #include "builtin-atomic-overloads.def"