//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // type_traits // template // struct is_constructible; #include struct A { explicit A(int); A(int, double); #if __has_feature(cxx_access_control_sfinae) private: #endif A(char); }; class Abstract { virtual void foo() = 0; }; class AbstractDestructor { virtual ~AbstractDestructor() = 0; }; template void test_is_constructible() { static_assert( (std::is_constructible::value), ""); } template void test_is_constructible() { static_assert( (std::is_constructible::value), ""); } template void test_is_constructible() { static_assert( (std::is_constructible::value), ""); } template void test_is_not_constructible() { static_assert((!std::is_constructible::value), ""); } template void test_is_not_constructible() { static_assert((!std::is_constructible::value), ""); } int main() { test_is_constructible (); test_is_constructible (); test_is_constructible (); test_is_constructible (); test_is_constructible (); test_is_not_constructible (); #if __has_feature(cxx_access_control_sfinae) test_is_not_constructible (); #else test_is_constructible (); #endif test_is_not_constructible (); test_is_not_constructible (); test_is_not_constructible (); test_is_not_constructible (); test_is_not_constructible (); }