remove_all_extents.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::remove_all_extents;
using std::tr1::is_same;
using namespace __gnu_test;
VERIFY( (is_same<remove_all_extents<int>::type, int>::value) );
VERIFY( (is_same<remove_all_extents<int[2]>::type, int>::value) );
VERIFY( (is_same<remove_all_extents<int[2][3]>::type, int>::value) );
VERIFY( (is_same<remove_all_extents<int[][3]>::type, int>::value) );
VERIFY( (is_same<remove_all_extents<const int[2][3]>::type,
const int>::value) );
VERIFY( (is_same<remove_all_extents<ClassType>::type, ClassType>::value) );
VERIFY( (is_same<remove_all_extents<ClassType[2]>::type, ClassType>::value) );
VERIFY( (is_same<remove_all_extents<ClassType[2][3]>::type,
ClassType>::value) );
VERIFY( (is_same<remove_all_extents<ClassType[][3]>::type,
ClassType>::value) );
VERIFY( (is_same<remove_all_extents<const ClassType[2][3]>::type,
const ClassType>::value) );
}
int main()
{
test01();
return 0;
}