is_constructible.pass.cpp revision 1468b668aa964beb1220e9b36162b092fb54952b
1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is dual licensed under the MIT and the University of Illinois Open 6// Source Licenses. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10// type_traits 11 12// template <class T, class... Args> 13// struct is_constructible; 14 15#include <type_traits> 16 17struct A 18{ 19 explicit A(int); 20 A(int, double); 21}; 22 23int main() 24{ 25 static_assert((std::is_constructible<int>::value), ""); 26 static_assert((std::is_constructible<int, const int>::value), ""); 27 static_assert((std::is_constructible<A, int>::value), ""); 28 static_assert((std::is_constructible<A, int, double>::value), ""); 29 static_assert((!std::is_constructible<A>::value), ""); 30} 31