When satisfation of SFINAE condition depends on the function being declared, is that condition guaranteed to be false?
Consider this code: #include <type_traits> struct A {}; struct B { template <typename T, std::enable_if_t<!std::is_constructible_v<B, T &&>, std::nullptr_t> = nullptr> B(T &&) {} }; int main() { B b(A{}); } Both Clang, GCC, and MSVC accept it. Is this code valid, or should the compilers reject it? Interestingly, if I use requires instead of enable_if_t, … Read more