Type trait for aggregate initializability in the standard library?
问题 The C++ standard library has std::is_constructible<Class, T...> to check if a class can be constructed from the given types as arguments. For example, if I have a class MyClass which has a constructor MyClass(int, char) , then std::is_constructible<MyClass, int, char>::value will be true . Is there a similar standard library type trait that will check that aggregate initialization works, i.e. MyClass{int, char} is well-formed and returns a MyClass ? My use case: I want to write a function