has_trivial_destructor.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_trivial_destructor;
using namespace __gnu_test;
VERIFY( (test_category<has_trivial_destructor, void>(true)) );
VERIFY( (test_category<has_trivial_destructor, int>(true)) );
VERIFY( (test_category<has_trivial_destructor, float>(true)) );
VERIFY( (test_category<has_trivial_destructor, EnumType>(true)) );
VERIFY( (test_category<has_trivial_destructor, int*>(true)) );
VERIFY( (test_category<has_trivial_destructor, int(*)(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int (ClassType::*)>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*) (int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, int[2]>(true)) );
VERIFY( (test_category<has_trivial_destructor, float[][3]>(true)) );
VERIFY( (test_category<has_trivial_destructor, EnumType[2][3][4]>(true)) );
VERIFY( (test_category<has_trivial_destructor, int*[3]>(true)) );
VERIFY( (test_category<has_trivial_destructor, int(*[][2])(int)>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*[2][3])>(true)) );
VERIFY( (test_category<has_trivial_destructor,
int (ClassType::*[][2][3]) (int)>(true)) );
VERIFY( (test_category<has_trivial_destructor, ClassType>(false)) );
}
int main()
{
test01();
return 0;
}