is_constructible.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. 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 17#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE 18 19struct A 20{ 21 explicit A(int); 22 A(int, double); 23}; 24 25#endif 26 27int main() 28{ 29#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE 30 31 static_assert((std::is_constructible<int>::value), ""); 32 static_assert((std::is_constructible<int, const int>::value), ""); 33 static_assert((std::is_constructible<A, int>::value), ""); 34 static_assert((std::is_constructible<A, int, double>::value), ""); 35 static_assert((!std::is_constructible<A>::value), ""); 36 37#endif 38} 39