has_nothrow_constructor.cc [plain text]
#include <tr1/type_traits>
#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
bool test __attribute__((unused)) = true;
using std::tr1::has_nothrow_constructor;
using namespace __gnu_test;
VERIFY( (test_category<has_nothrow_constructor, void>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int>(true)) );
VERIFY( (test_category<has_nothrow_constructor, float>(true)) );
VERIFY( (test_category<has_nothrow_constructor, EnumType>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int*>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int (ClassType::*)>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int[2]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, float[][3]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, EnumType[2][3][4]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int*[3]>(true)) );
VERIFY( (test_category<has_nothrow_constructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<has_nothrow_constructor,
int (ClassType::*[][2][3]) (int)>(true)) );
VERIFY( (test_category<has_nothrow_constructor, ClassType>(false)) );
}
int main()
{
test01();
return 0;
}