diff options
Diffstat (limited to 'test/utilities/meta/meta.unary')
61 files changed, 61 insertions, 61 deletions
diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp index 4588bbb1e..da1a68137 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/array.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// array
#include <type_traits>
template <class T>
void test_array_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert( std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_array()
{
test_array_imp<T>();
test_array_imp<const T>();
test_array_imp<volatile T>();
test_array_imp<const volatile T>();
}
typedef char array[3];
typedef const char const_array[3];
typedef char incomplete_array[];
int main()
{
test_array<array>();
test_array<const_array>();
test_array<incomplete_array>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// array
#include <type_traits>
template <class T>
void test_array_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert( std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_array()
{
test_array_imp<T>();
test_array_imp<const T>();
test_array_imp<volatile T>();
test_array_imp<const volatile T>();
}
typedef char array[3];
typedef const char const_array[3];
typedef char incomplete_array[];
int main()
{
test_array<array>();
test_array<const_array>();
test_array<incomplete_array>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp index 99207322c..fa604cf18 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/class.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// class
#include <type_traits>
template <class T>
void test_class_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert( std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_class()
{
test_class_imp<T>();
test_class_imp<const T>();
test_class_imp<volatile T>();
test_class_imp<const volatile T>();
}
class Class
{
int _;
double __;
};
int main()
{
test_class<Class>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// class
#include <type_traits>
template <class T>
void test_class_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert( std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_class()
{
test_class_imp<T>();
test_class_imp<const T>();
test_class_imp<volatile T>();
test_class_imp<const volatile T>();
}
class Class
{
int _;
double __;
};
int main()
{
test_class<Class>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp index 972654b0b..b1a72f9f1 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/enum.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// enum
#include <type_traits>
template <class T>
void test_enum_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert( std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_enum()
{
test_enum_imp<T>();
test_enum_imp<const T>();
test_enum_imp<volatile T>();
test_enum_imp<const volatile T>();
}
enum Enum {zero, one};
int main()
{
test_enum<Enum>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// enum
#include <type_traits>
template <class T>
void test_enum_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert( std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_enum()
{
test_enum_imp<T>();
test_enum_imp<const T>();
test_enum_imp<volatile T>();
test_enum_imp<const volatile T>();
}
enum Enum {zero, one};
int main()
{
test_enum<Enum>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp index 70ba35b37..bd5d03f44 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/floating_point.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// floating_point
#include <type_traits>
template <class T>
void test_floating_point_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert( std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_floating_point()
{
test_floating_point_imp<T>();
test_floating_point_imp<const T>();
test_floating_point_imp<volatile T>();
test_floating_point_imp<const volatile T>();
}
int main()
{
test_floating_point<float>();
test_floating_point<double>();
test_floating_point<long double>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// floating_point
#include <type_traits>
template <class T>
void test_floating_point_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert( std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_floating_point()
{
test_floating_point_imp<T>();
test_floating_point_imp<const T>();
test_floating_point_imp<volatile T>();
test_floating_point_imp<const volatile T>();
}
int main()
{
test_floating_point<float>();
test_floating_point<double>();
test_floating_point<long double>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp index ee9753f2c..a3bab5b32 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/function.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// function
#include <type_traits>
template <class T>
void test_function_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert( std::is_function<T>::value, "");
}
template <class T>
void test_function()
{
test_function_imp<T>();
test_function_imp<const T>();
test_function_imp<volatile T>();
test_function_imp<const volatile T>();
}
int main()
{
test_function<void ()>();
test_function<void (int)>();
test_function<int (double)>();
test_function<int (double, char)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// function
#include <type_traits>
template <class T>
void test_function_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert( std::is_function<T>::value, "");
}
template <class T>
void test_function()
{
test_function_imp<T>();
test_function_imp<const T>();
test_function_imp<volatile T>();
test_function_imp<const volatile T>();
}
int main()
{
test_function<void ()>();
test_function<void (int)>();
test_function<int (double)>();
test_function<int (double, char)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp index afa6a9d18..a4c0cb427 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// integral
#include <type_traits>
template <class T>
void test_integral_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert( std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_integral()
{
test_integral_imp<T>();
test_integral_imp<const T>();
test_integral_imp<volatile T>();
test_integral_imp<const volatile T>();
}
int main()
{
test_integral<bool>();
test_integral<char>();
test_integral<signed char>();
test_integral<unsigned char>();
test_integral<wchar_t>();
test_integral<short>();
test_integral<unsigned short>();
test_integral<int>();
test_integral<unsigned int>();
test_integral<long>();
test_integral<unsigned long>();
test_integral<long long>();
test_integral<unsigned long long>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// integral
#include <type_traits>
template <class T>
void test_integral_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert( std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_integral()
{
test_integral_imp<T>();
test_integral_imp<const T>();
test_integral_imp<volatile T>();
test_integral_imp<const volatile T>();
}
int main()
{
test_integral<bool>();
test_integral<char>();
test_integral<signed char>();
test_integral<unsigned char>();
test_integral<wchar_t>();
test_integral<short>();
test_integral<unsigned short>();
test_integral<int>();
test_integral<unsigned int>();
test_integral<long>();
test_integral<unsigned long>();
test_integral<long long>();
test_integral<unsigned long long>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp index 85d6bc494..581a8aeb1 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/lvalue_ref.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// lvalue_ref
#include <type_traits>
template <class T>
void test_lvalue_ref()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert( std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
int main()
{
test_lvalue_ref<int&>();
test_lvalue_ref<const int&>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// lvalue_ref
#include <type_traits>
template <class T>
void test_lvalue_ref()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert( std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
int main()
{
test_lvalue_ref<int&>();
test_lvalue_ref<const int&>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp index 77c424f93..2a66fa0a9 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_function_pointer
#include <type_traits>
template <class T>
void test_member_function_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert( std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_member_function_pointer()
{
test_member_function_pointer_imp<T>();
test_member_function_pointer_imp<const T>();
test_member_function_pointer_imp<volatile T>();
test_member_function_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_function_pointer<void (Class::*)()>();
test_member_function_pointer<void (Class::*)(int)>();
test_member_function_pointer<void (Class::*)(int, char)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_function_pointer
#include <type_traits>
template <class T>
void test_member_function_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert( std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_member_function_pointer()
{
test_member_function_pointer_imp<T>();
test_member_function_pointer_imp<const T>();
test_member_function_pointer_imp<volatile T>();
test_member_function_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_function_pointer<void (Class::*)()>();
test_member_function_pointer<void (Class::*)(int)>();
test_member_function_pointer<void (Class::*)(int, char)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp index 13a2577f9..ed9eff866 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/member_object_pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_object_pointer
#include <type_traits>
template <class T>
void test_member_object_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert( std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_member_object_pointer()
{
test_member_object_pointer_imp<T>();
test_member_object_pointer_imp<const T>();
test_member_object_pointer_imp<volatile T>();
test_member_object_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_object_pointer<int Class::*>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_object_pointer
#include <type_traits>
template <class T>
void test_member_object_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert( std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_member_object_pointer()
{
test_member_object_pointer_imp<T>();
test_member_object_pointer_imp<const T>();
test_member_object_pointer_imp<volatile T>();
test_member_object_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_object_pointer<int Class::*>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp index 07d38f384..263e73886 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// pointer
#include <type_traits>
template <class T>
void test_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert( std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_pointer()
{
test_pointer_imp<T>();
test_pointer_imp<const T>();
test_pointer_imp<volatile T>();
test_pointer_imp<const volatile T>();
}
int main()
{
test_pointer<void*>();
test_pointer<int*>();
test_pointer<const int*>();
test_pointer<void (*)(int)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// pointer
#include <type_traits>
template <class T>
void test_pointer_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert( std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_pointer()
{
test_pointer_imp<T>();
test_pointer_imp<const T>();
test_pointer_imp<volatile T>();
test_pointer_imp<const volatile T>();
}
int main()
{
test_pointer<void*>();
test_pointer<int*>();
test_pointer<const int*>();
test_pointer<void (*)(int)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp index 0579b5a29..91d7a6e09 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/rvalue_ref.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rvalue_ref
#include <type_traits>
template <class T>
void test_rvalue_ref()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert( std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
int main()
{
#ifdef _LIBCPP_MOVE
test_rvalue_ref<int&&>();
test_rvalue_ref<const int&&>();
#endif
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rvalue_ref
#include <type_traits>
template <class T>
void test_rvalue_ref()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert( std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
int main()
{
#ifdef _LIBCPP_MOVE
test_rvalue_ref<int&&>();
test_rvalue_ref<const int&&>();
#endif
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp index 644665e87..07c9729ff 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/union.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// union
#include <type_traits>
template <class T>
void test_union_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert( std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_union()
{
test_union_imp<T>();
test_union_imp<const T>();
test_union_imp<volatile T>();
test_union_imp<const volatile T>();
}
union Union
{
int _;
double __;
};
int main()
{
test_union<Union>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// union
#include <type_traits>
template <class T>
void test_union_imp()
{
static_assert(!std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert( std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_union()
{
test_union_imp<T>();
test_union_imp<const T>();
test_union_imp<volatile T>();
test_union_imp<const volatile T>();
}
union Union
{
int _;
double __;
};
int main()
{
test_union<Union>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp index a17e95b87..cfcff70a9 100644 --- a/test/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.cat/void.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// void
#include <type_traits>
template <class T>
void test_void_imp()
{
static_assert( std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_void()
{
test_void_imp<T>();
test_void_imp<const T>();
test_void_imp<volatile T>();
test_void_imp<const volatile T>();
}
int main()
{
test_void<void>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// void
#include <type_traits>
template <class T>
void test_void_imp()
{
static_assert( std::is_void<T>::value, "");
static_assert(!std::is_integral<T>::value, "");
static_assert(!std::is_floating_point<T>::value, "");
static_assert(!std::is_array<T>::value, "");
static_assert(!std::is_pointer<T>::value, "");
static_assert(!std::is_lvalue_reference<T>::value, "");
static_assert(!std::is_rvalue_reference<T>::value, "");
static_assert(!std::is_member_object_pointer<T>::value, "");
static_assert(!std::is_member_function_pointer<T>::value, "");
static_assert(!std::is_enum<T>::value, "");
static_assert(!std::is_union<T>::value, "");
static_assert(!std::is_class<T>::value, "");
static_assert(!std::is_function<T>::value, "");
}
template <class T>
void test_void()
{
test_void_imp<T>();
test_void_imp<const T>();
test_void_imp<volatile T>();
test_void_imp<const volatile T>();
}
int main()
{
test_void<void>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp index a064eaabc..e521e4597 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/array.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// array
#include <type_traits>
template <class T>
void test_array_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_array()
{
test_array_imp<T>();
test_array_imp<const T>();
test_array_imp<volatile T>();
test_array_imp<const volatile T>();
}
typedef char array[3];
typedef const char const_array[3];
typedef char incomplete_array[];
int main()
{
test_array<array>();
test_array<const_array>();
test_array<incomplete_array>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// array
#include <type_traits>
template <class T>
void test_array_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_array()
{
test_array_imp<T>();
test_array_imp<const T>();
test_array_imp<volatile T>();
test_array_imp<const volatile T>();
}
typedef char array[3];
typedef const char const_array[3];
typedef char incomplete_array[];
int main()
{
test_array<array>();
test_array<const_array>();
test_array<incomplete_array>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp index a3ebad701..4ddf499d7 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/class.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// class
#include <type_traits>
template <class T>
void test_class_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_class()
{
test_class_imp<T>();
test_class_imp<const T>();
test_class_imp<volatile T>();
test_class_imp<const volatile T>();
}
class Class
{
int _;
double __;
};
int main()
{
test_class<Class>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// class
#include <type_traits>
template <class T>
void test_class_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_class()
{
test_class_imp<T>();
test_class_imp<const T>();
test_class_imp<volatile T>();
test_class_imp<const volatile T>();
}
class Class
{
int _;
double __;
};
int main()
{
test_class<Class>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp index e6a30b82e..cdd87e84c 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/enum.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// enum
#include <type_traits>
template <class T>
void test_enum_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_enum()
{
test_enum_imp<T>();
test_enum_imp<const T>();
test_enum_imp<volatile T>();
test_enum_imp<const volatile T>();
}
enum Enum {zero, one};
int main()
{
test_enum<Enum>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// enum
#include <type_traits>
template <class T>
void test_enum_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_enum()
{
test_enum_imp<T>();
test_enum_imp<const T>();
test_enum_imp<volatile T>();
test_enum_imp<const volatile T>();
}
enum Enum {zero, one};
int main()
{
test_enum<Enum>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp index 35752ea99..d5d06eba7 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/floating_point.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// floating_point
#include <type_traits>
template <class T>
void test_floating_point_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert( std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_floating_point()
{
test_floating_point_imp<T>();
test_floating_point_imp<const T>();
test_floating_point_imp<volatile T>();
test_floating_point_imp<const volatile T>();
}
int main()
{
test_floating_point<float>();
test_floating_point<double>();
test_floating_point<long double>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// floating_point
#include <type_traits>
template <class T>
void test_floating_point_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert( std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_floating_point()
{
test_floating_point_imp<T>();
test_floating_point_imp<const T>();
test_floating_point_imp<volatile T>();
test_floating_point_imp<const volatile T>();
}
int main()
{
test_floating_point<float>();
test_floating_point<double>();
test_floating_point<long double>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp index d625c5398..f67fd8f36 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/function.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// function
#include <type_traits>
template <class T>
void test_function_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_function()
{
test_function_imp<T>();
test_function_imp<const T>();
test_function_imp<volatile T>();
test_function_imp<const volatile T>();
}
int main()
{
test_function<void ()>();
test_function<void (int)>();
test_function<int (double)>();
test_function<int (double, char)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// function
#include <type_traits>
template <class T>
void test_function_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_function()
{
test_function_imp<T>();
test_function_imp<const T>();
test_function_imp<volatile T>();
test_function_imp<const volatile T>();
}
int main()
{
test_function<void ()>();
test_function<void (int)>();
test_function<int (double)>();
test_function<int (double, char)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp index c11d5b802..12c72ee5a 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// integral
#include <type_traits>
template <class T>
void test_integral_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert( std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_integral()
{
test_integral_imp<T>();
test_integral_imp<const T>();
test_integral_imp<volatile T>();
test_integral_imp<const volatile T>();
}
int main()
{
test_integral<bool>();
test_integral<char>();
test_integral<signed char>();
test_integral<unsigned char>();
test_integral<wchar_t>();
test_integral<short>();
test_integral<unsigned short>();
test_integral<int>();
test_integral<unsigned int>();
test_integral<long>();
test_integral<unsigned long>();
test_integral<long long>();
test_integral<unsigned long long>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// integral
#include <type_traits>
template <class T>
void test_integral_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert( std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_integral()
{
test_integral_imp<T>();
test_integral_imp<const T>();
test_integral_imp<volatile T>();
test_integral_imp<const volatile T>();
}
int main()
{
test_integral<bool>();
test_integral<char>();
test_integral<signed char>();
test_integral<unsigned char>();
test_integral<wchar_t>();
test_integral<short>();
test_integral<unsigned short>();
test_integral<int>();
test_integral<unsigned int>();
test_integral<long>();
test_integral<unsigned long>();
test_integral<long long>();
test_integral<unsigned long long>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp index 363c52680..db749b0e8 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/lvalue_ref.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// lvalue_ref
#include <type_traits>
template <class T>
void test_lvalue_ref()
{
static_assert( std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
int main()
{
test_lvalue_ref<int&>();
test_lvalue_ref<const int&>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// lvalue_ref
#include <type_traits>
template <class T>
void test_lvalue_ref()
{
static_assert( std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
int main()
{
test_lvalue_ref<int&>();
test_lvalue_ref<const int&>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp index 579a803c6..9e8f15973 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/member_function_pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_function_pointer
#include <type_traits>
template <class T>
void test_member_function_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert( std::is_member_pointer<T>::value, "");
}
template <class T>
void test_member_function_pointer()
{
test_member_function_pointer_imp<T>();
test_member_function_pointer_imp<const T>();
test_member_function_pointer_imp<volatile T>();
test_member_function_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_function_pointer<void (Class::*)()>();
test_member_function_pointer<void (Class::*)(int)>();
test_member_function_pointer<void (Class::*)(int, char)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_function_pointer
#include <type_traits>
template <class T>
void test_member_function_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert( std::is_member_pointer<T>::value, "");
}
template <class T>
void test_member_function_pointer()
{
test_member_function_pointer_imp<T>();
test_member_function_pointer_imp<const T>();
test_member_function_pointer_imp<volatile T>();
test_member_function_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_function_pointer<void (Class::*)()>();
test_member_function_pointer<void (Class::*)(int)>();
test_member_function_pointer<void (Class::*)(int, char)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp index 685a985db..6af0606f0 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/member_object_pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_object_pointer
#include <type_traits>
template <class T>
void test_member_object_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert( std::is_member_pointer<T>::value, "");
}
template <class T>
void test_member_object_pointer()
{
test_member_object_pointer_imp<T>();
test_member_object_pointer_imp<const T>();
test_member_object_pointer_imp<volatile T>();
test_member_object_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_object_pointer<int Class::*>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// member_object_pointer
#include <type_traits>
template <class T>
void test_member_object_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert( std::is_member_pointer<T>::value, "");
}
template <class T>
void test_member_object_pointer()
{
test_member_object_pointer_imp<T>();
test_member_object_pointer_imp<const T>();
test_member_object_pointer_imp<volatile T>();
test_member_object_pointer_imp<const volatile T>();
}
class Class
{
};
int main()
{
test_member_object_pointer<int Class::*>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp index 88721696f..ccc936b13 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/pointer.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// pointer
#include <type_traits>
template <class T>
void test_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_pointer()
{
test_pointer_imp<T>();
test_pointer_imp<const T>();
test_pointer_imp<volatile T>();
test_pointer_imp<const volatile T>();
}
int main()
{
test_pointer<void*>();
test_pointer<int*>();
test_pointer<const int*>();
test_pointer<void (*)(int)>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// pointer
#include <type_traits>
template <class T>
void test_pointer_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert( std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_pointer()
{
test_pointer_imp<T>();
test_pointer_imp<const T>();
test_pointer_imp<volatile T>();
test_pointer_imp<const volatile T>();
}
int main()
{
test_pointer<void*>();
test_pointer<int*>();
test_pointer<const int*>();
test_pointer<void (*)(int)>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp index f7bef3968..7233ba99f 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/rvalue_ref.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rvalue_ref
#include <type_traits>
template <class T>
void test_rvalue_ref()
{
static_assert(std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
int main()
{
#ifdef _LIBCPP_MOVE
test_rvalue_ref<int&&>();
test_rvalue_ref<const int&&>();
#endif
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rvalue_ref
#include <type_traits>
template <class T>
void test_rvalue_ref()
{
static_assert(std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
int main()
{
#ifdef _LIBCPP_MOVE
test_rvalue_ref<int&&>();
test_rvalue_ref<const int&&>();
#endif
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp index 535a181e8..8eb857064 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/union.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// union
#include <type_traits>
template <class T>
void test_union_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_union()
{
test_union_imp<T>();
test_union_imp<const T>();
test_union_imp<volatile T>();
test_union_imp<const volatile T>();
}
union Union
{
int _;
double __;
};
int main()
{
test_union<Union>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// union
#include <type_traits>
template <class T>
void test_union_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert(!std::is_fundamental<T>::value, "");
static_assert( std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert( std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_union()
{
test_union_imp<T>();
test_union_imp<const T>();
test_union_imp<volatile T>();
test_union_imp<const volatile T>();
}
union Union
{
int _;
double __;
};
int main()
{
test_union<Union>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp index 8abad5ac9..88c2fa8a0 100644 --- a/test/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.comp/void.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// void
#include <type_traits>
template <class T>
void test_void_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_void()
{
test_void_imp<T>();
test_void_imp<const T>();
test_void_imp<volatile T>();
test_void_imp<const volatile T>();
}
int main()
{
test_void<void>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// void
#include <type_traits>
template <class T>
void test_void_imp()
{
static_assert(!std::is_reference<T>::value, "");
static_assert(!std::is_arithmetic<T>::value, "");
static_assert( std::is_fundamental<T>::value, "");
static_assert(!std::is_object<T>::value, "");
static_assert(!std::is_scalar<T>::value, "");
static_assert(!std::is_compound<T>::value, "");
static_assert(!std::is_member_pointer<T>::value, "");
}
template <class T>
void test_void()
{
test_void_imp<T>();
test_void_imp<const T>();
test_void_imp<volatile T>();
test_void_imp<const volatile T>();
}
int main()
{
test_void<void>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/alignment_of.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/alignment_of.pass.cpp index f44396918..093ca33c9 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/alignment_of.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/alignment_of.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// alignment_of
#include <type_traits>
template <class T, unsigned A>
void test_alignment_of()
{
static_assert( std::alignment_of<T>::value == A, "");
static_assert( std::alignment_of<const T>::value == A, "");
static_assert( std::alignment_of<volatile T>::value == A, "");
static_assert( std::alignment_of<const volatile T>::value == A, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_alignment_of<int&, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<Class, 1>();
test_alignment_of<int*, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<const int*, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<char[3], 1>();
test_alignment_of<int, 4>();
test_alignment_of<double, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<bool, 1>();
test_alignment_of<unsigned, 4>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// alignment_of
#include <type_traits>
template <class T, unsigned A>
void test_alignment_of()
{
static_assert( std::alignment_of<T>::value == A, "");
static_assert( std::alignment_of<const T>::value == A, "");
static_assert( std::alignment_of<volatile T>::value == A, "");
static_assert( std::alignment_of<const volatile T>::value == A, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_alignment_of<int&, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<Class, 1>();
test_alignment_of<int*, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<const int*, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<char[3], 1>();
test_alignment_of<int, 4>();
test_alignment_of<double, sizeof(long) == 4 ? 4 : 8>();
test_alignment_of<bool, 1>();
test_alignment_of<unsigned, 4>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/extent.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/extent.pass.cpp index 8deb5bf3f..d149eb3d9 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/extent.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/extent.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// extent
#include <type_traits>
template <class T, unsigned A>
void test_extent()
{
static_assert((std::extent<T>::value == A), "");
static_assert((std::extent<const T>::value == A), "");
static_assert((std::extent<volatile T>::value == A), "");
static_assert((std::extent<const volatile T>::value == A), "");
}
template <class T, unsigned A>
void test_extent1()
{
static_assert((std::extent<T, 1>::value == A), "");
static_assert((std::extent<const T, 1>::value == A), "");
static_assert((std::extent<volatile T, 1>::value == A), "");
static_assert((std::extent<const volatile T, 1>::value == A), "");
}
class Class
{
public:
~Class();
};
int main()
{
test_extent<void, 0>();
test_extent<int&, 0>();
test_extent<Class, 0>();
test_extent<int*, 0>();
test_extent<const int*, 0>();
test_extent<int, 0>();
test_extent<double, 0>();
test_extent<bool, 0>();
test_extent<unsigned, 0>();
test_extent<int[2], 2>();
test_extent<int[2][4], 2>();
test_extent<int[][4], 0>();
test_extent1<int, 0>();
test_extent1<int[2], 0>();
test_extent1<int[2][4], 4>();
test_extent1<int[][4], 4>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// extent
#include <type_traits>
template <class T, unsigned A>
void test_extent()
{
static_assert((std::extent<T>::value == A), "");
static_assert((std::extent<const T>::value == A), "");
static_assert((std::extent<volatile T>::value == A), "");
static_assert((std::extent<const volatile T>::value == A), "");
}
template <class T, unsigned A>
void test_extent1()
{
static_assert((std::extent<T, 1>::value == A), "");
static_assert((std::extent<const T, 1>::value == A), "");
static_assert((std::extent<volatile T, 1>::value == A), "");
static_assert((std::extent<const volatile T, 1>::value == A), "");
}
class Class
{
public:
~Class();
};
int main()
{
test_extent<void, 0>();
test_extent<int&, 0>();
test_extent<Class, 0>();
test_extent<int*, 0>();
test_extent<const int*, 0>();
test_extent<int, 0>();
test_extent<double, 0>();
test_extent<bool, 0>();
test_extent<unsigned, 0>();
test_extent<int[2], 2>();
test_extent<int[2][4], 2>();
test_extent<int[][4], 0>();
test_extent1<int, 0>();
test_extent1<int[2], 0>();
test_extent1<int[2][4], 4>();
test_extent1<int[][4], 4>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_assign.pass.cpp index 0c9c6fc6d..787cd79c3 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_assign.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_constructor.pass.cpp index 122324933..7acb69509 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_copy_constructor.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_default_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_default_constructor.pass.cpp index 2d48cdbac..d253a821e 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_default_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_default_constructor.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_move_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_move_assign.pass.cpp index 926d3fd52..0c115686d 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_move_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_move_assign.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_move_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_move_constructor.pass.cpp index 26b060cbd..1f5b56326 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_move_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_move_constructor.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_assign.pass.cpp index a08ac8f6c..31a5a7c1c 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_assign.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_copy_assign
#include <type_traits>
template <class T>
void test_has_nothrow_assign()
{
static_assert( std::has_nothrow_copy_assign<T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const T>::value, "");
static_assert( std::has_nothrow_copy_assign<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_assign()
{
static_assert(!std::has_nothrow_copy_assign<T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const T>::value, "");
static_assert(!std::has_nothrow_copy_assign<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A& operator=(const A&);
};
int main()
{
test_has_not_nothrow_assign<void>();
test_has_not_nothrow_assign<A>();
test_has_not_nothrow_assign<int&>();
test_has_nothrow_assign<Union>();
test_has_nothrow_assign<Abstract>();
test_has_nothrow_assign<Empty>();
test_has_nothrow_assign<int>();
test_has_nothrow_assign<double>();
test_has_nothrow_assign<int*>();
test_has_nothrow_assign<const int*>();
test_has_nothrow_assign<char[3]>();
test_has_nothrow_assign<char[3]>();
test_has_nothrow_assign<NotEmpty>();
test_has_nothrow_assign<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_copy_assign
#include <type_traits>
template <class T>
void test_has_nothrow_assign()
{
static_assert( std::has_nothrow_copy_assign<T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const T>::value, "");
static_assert( std::has_nothrow_copy_assign<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_assign()
{
static_assert(!std::has_nothrow_copy_assign<T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const T>::value, "");
static_assert(!std::has_nothrow_copy_assign<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_assign<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A& operator=(const A&);
};
int main()
{
test_has_not_nothrow_assign<void>();
test_has_not_nothrow_assign<A>();
test_has_not_nothrow_assign<int&>();
test_has_nothrow_assign<Union>();
test_has_nothrow_assign<Abstract>();
test_has_nothrow_assign<Empty>();
test_has_nothrow_assign<int>();
test_has_nothrow_assign<double>();
test_has_nothrow_assign<int*>();
test_has_nothrow_assign<const int*>();
test_has_nothrow_assign<char[3]>();
test_has_nothrow_assign<char[3]>();
test_has_nothrow_assign<NotEmpty>();
test_has_nothrow_assign<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp index 2561939a4..1a9beaa5d 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_copy_constructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_copy_constructor
#include <type_traits>
template <class T>
void test_has_nothrow_copy_constructor()
{
static_assert( std::has_nothrow_copy_constructor<T>::value, "");
static_assert( std::has_nothrow_copy_constructor<const T>::value, "");
static_assert( std::has_nothrow_copy_constructor<volatile T>::value, "");
static_assert( std::has_nothrow_copy_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_copy_constructor()
{
static_assert(!std::has_nothrow_copy_constructor<T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<const T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
int main()
{
test_has_not_nothrow_copy_constructor<void>();
test_has_not_nothrow_copy_constructor<A>();
test_has_not_nothrow_copy_constructor<int&>();
test_has_nothrow_copy_constructor<Union>();
test_has_nothrow_copy_constructor<Abstract>();
test_has_nothrow_copy_constructor<Empty>();
test_has_nothrow_copy_constructor<int>();
test_has_nothrow_copy_constructor<double>();
test_has_nothrow_copy_constructor<int*>();
test_has_nothrow_copy_constructor<const int*>();
test_has_nothrow_copy_constructor<char[3]>();
test_has_nothrow_copy_constructor<char[3]>();
test_has_nothrow_copy_constructor<NotEmpty>();
test_has_nothrow_copy_constructor<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_copy_constructor
#include <type_traits>
template <class T>
void test_has_nothrow_copy_constructor()
{
static_assert( std::has_nothrow_copy_constructor<T>::value, "");
static_assert( std::has_nothrow_copy_constructor<const T>::value, "");
static_assert( std::has_nothrow_copy_constructor<volatile T>::value, "");
static_assert( std::has_nothrow_copy_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_copy_constructor()
{
static_assert(!std::has_nothrow_copy_constructor<T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<const T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<volatile T>::value, "");
static_assert(!std::has_nothrow_copy_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
int main()
{
test_has_not_nothrow_copy_constructor<void>();
test_has_not_nothrow_copy_constructor<A>();
test_has_not_nothrow_copy_constructor<int&>();
test_has_nothrow_copy_constructor<Union>();
test_has_nothrow_copy_constructor<Abstract>();
test_has_nothrow_copy_constructor<Empty>();
test_has_nothrow_copy_constructor<int>();
test_has_nothrow_copy_constructor<double>();
test_has_nothrow_copy_constructor<int*>();
test_has_nothrow_copy_constructor<const int*>();
test_has_nothrow_copy_constructor<char[3]>();
test_has_nothrow_copy_constructor<char[3]>();
test_has_nothrow_copy_constructor<NotEmpty>();
test_has_nothrow_copy_constructor<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_default_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_default_constructor.pass.cpp index 6e608ee70..2a4e81e5d 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_default_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_default_constructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_default_constructor
#include <type_traits>
template <class T>
void test_has_nothrow_default_constructor()
{
static_assert( std::has_nothrow_default_constructor<T>::value, "");
static_assert( std::has_nothrow_default_constructor<const T>::value, "");
static_assert( std::has_nothrow_default_constructor<volatile T>::value, "");
static_assert( std::has_nothrow_default_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_default_constructor()
{
static_assert(!std::has_nothrow_default_constructor<T>::value, "");
static_assert(!std::has_nothrow_default_constructor<const T>::value, "");
static_assert(!std::has_nothrow_default_constructor<volatile T>::value, "");
static_assert(!std::has_nothrow_default_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A();
};
int main()
{
test_has_not_nothrow_default_constructor<void>();
test_has_not_nothrow_default_constructor<int&>();
test_has_not_nothrow_default_constructor<A>();
test_has_nothrow_default_constructor<Union>();
test_has_nothrow_default_constructor<Abstract>();
test_has_nothrow_default_constructor<Empty>();
test_has_nothrow_default_constructor<int>();
test_has_nothrow_default_constructor<double>();
test_has_nothrow_default_constructor<int*>();
test_has_nothrow_default_constructor<const int*>();
test_has_nothrow_default_constructor<char[3]>();
test_has_nothrow_default_constructor<char[3]>();
test_has_nothrow_default_constructor<NotEmpty>();
test_has_nothrow_default_constructor<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_nothrow_default_constructor
#include <type_traits>
template <class T>
void test_has_nothrow_default_constructor()
{
static_assert( std::has_nothrow_default_constructor<T>::value, "");
static_assert( std::has_nothrow_default_constructor<const T>::value, "");
static_assert( std::has_nothrow_default_constructor<volatile T>::value, "");
static_assert( std::has_nothrow_default_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_nothrow_default_constructor()
{
static_assert(!std::has_nothrow_default_constructor<T>::value, "");
static_assert(!std::has_nothrow_default_constructor<const T>::value, "");
static_assert(!std::has_nothrow_default_constructor<volatile T>::value, "");
static_assert(!std::has_nothrow_default_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A();
};
int main()
{
test_has_not_nothrow_default_constructor<void>();
test_has_not_nothrow_default_constructor<int&>();
test_has_not_nothrow_default_constructor<A>();
test_has_nothrow_default_constructor<Union>();
test_has_nothrow_default_constructor<Abstract>();
test_has_nothrow_default_constructor<Empty>();
test_has_nothrow_default_constructor<int>();
test_has_nothrow_default_constructor<double>();
test_has_nothrow_default_constructor<int*>();
test_has_nothrow_default_constructor<const int*>();
test_has_nothrow_default_constructor<char[3]>();
test_has_nothrow_default_constructor<char[3]>();
test_has_nothrow_default_constructor<NotEmpty>();
test_has_nothrow_default_constructor<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_assign.pass.cpp index e1ed665d0..a0cd04397 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_assign.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_constructor.pass.cpp index 1dfa5f1b1..fb4e14f9c 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_nothrow_move_constructor.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_assign.pass.cpp index 9bb44c1cb..064195027 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_assign.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_copy_assign
#include <type_traits>
template <class T>
void test_has_trivial_assign()
{
static_assert( std::has_trivial_copy_assign<T>::value, "");
static_assert(!std::has_trivial_copy_assign<const T>::value, "");
static_assert( std::has_trivial_copy_assign<volatile T>::value, "");
static_assert(!std::has_trivial_copy_assign<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_assign()
{
static_assert(!std::has_trivial_copy_assign<T>::value, "");
static_assert(!std::has_trivial_copy_assign<const T>::value, "");
static_assert(!std::has_trivial_copy_assign<volatile T>::value, "");
static_assert(!std::has_trivial_copy_assign<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A& operator=(const A&);
};
int main()
{
test_has_not_trivial_assign<void>();
test_has_not_trivial_assign<A>();
test_has_not_trivial_assign<int&>();
test_has_trivial_assign<Union>();
test_has_trivial_assign<Abstract>();
test_has_trivial_assign<Empty>();
test_has_trivial_assign<int>();
test_has_trivial_assign<double>();
test_has_trivial_assign<int*>();
test_has_trivial_assign<const int*>();
test_has_trivial_assign<char[3]>();
test_has_trivial_assign<char[3]>();
test_has_trivial_assign<NotEmpty>();
test_has_trivial_assign<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_copy_assign
#include <type_traits>
template <class T>
void test_has_trivial_assign()
{
static_assert( std::has_trivial_copy_assign<T>::value, "");
static_assert(!std::has_trivial_copy_assign<const T>::value, "");
static_assert( std::has_trivial_copy_assign<volatile T>::value, "");
static_assert(!std::has_trivial_copy_assign<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_assign()
{
static_assert(!std::has_trivial_copy_assign<T>::value, "");
static_assert(!std::has_trivial_copy_assign<const T>::value, "");
static_assert(!std::has_trivial_copy_assign<volatile T>::value, "");
static_assert(!std::has_trivial_copy_assign<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A& operator=(const A&);
};
int main()
{
test_has_not_trivial_assign<void>();
test_has_not_trivial_assign<A>();
test_has_not_trivial_assign<int&>();
test_has_trivial_assign<Union>();
test_has_trivial_assign<Abstract>();
test_has_trivial_assign<Empty>();
test_has_trivial_assign<int>();
test_has_trivial_assign<double>();
test_has_trivial_assign<int*>();
test_has_trivial_assign<const int*>();
test_has_trivial_assign<char[3]>();
test_has_trivial_assign<char[3]>();
test_has_trivial_assign<NotEmpty>();
test_has_trivial_assign<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp index e142ae75a..711d9c391 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_copy_constructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_copy_constructor
#include <type_traits>
template <class T>
void test_has_trivial_copy_constructor()
{
static_assert( std::has_trivial_copy_constructor<T>::value, "");
static_assert( std::has_trivial_copy_constructor<const T>::value, "");
static_assert( std::has_trivial_copy_constructor<volatile T>::value, "");
static_assert( std::has_trivial_copy_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_copy_constructor()
{
static_assert(!std::has_trivial_copy_constructor<T>::value, "");
static_assert(!std::has_trivial_copy_constructor<const T>::value, "");
static_assert(!std::has_trivial_copy_constructor<volatile T>::value, "");
static_assert(!std::has_trivial_copy_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
int main()
{
test_has_not_trivial_copy_constructor<void>();
test_has_not_trivial_copy_constructor<A>();
test_has_not_trivial_copy_constructor<int&>();
test_has_trivial_copy_constructor<Union>();
test_has_trivial_copy_constructor<Abstract>();
test_has_trivial_copy_constructor<Empty>();
test_has_trivial_copy_constructor<int>();
test_has_trivial_copy_constructor<double>();
test_has_trivial_copy_constructor<int*>();
test_has_trivial_copy_constructor<const int*>();
test_has_trivial_copy_constructor<char[3]>();
test_has_trivial_copy_constructor<char[3]>();
test_has_trivial_copy_constructor<NotEmpty>();
test_has_trivial_copy_constructor<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_copy_constructor
#include <type_traits>
template <class T>
void test_has_trivial_copy_constructor()
{
static_assert( std::has_trivial_copy_constructor<T>::value, "");
static_assert( std::has_trivial_copy_constructor<const T>::value, "");
static_assert( std::has_trivial_copy_constructor<volatile T>::value, "");
static_assert( std::has_trivial_copy_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_copy_constructor()
{
static_assert(!std::has_trivial_copy_constructor<T>::value, "");
static_assert(!std::has_trivial_copy_constructor<const T>::value, "");
static_assert(!std::has_trivial_copy_constructor<volatile T>::value, "");
static_assert(!std::has_trivial_copy_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
int main()
{
test_has_not_trivial_copy_constructor<void>();
test_has_not_trivial_copy_constructor<A>();
test_has_not_trivial_copy_constructor<int&>();
test_has_trivial_copy_constructor<Union>();
test_has_trivial_copy_constructor<Abstract>();
test_has_trivial_copy_constructor<Empty>();
test_has_trivial_copy_constructor<int>();
test_has_trivial_copy_constructor<double>();
test_has_trivial_copy_constructor<int*>();
test_has_trivial_copy_constructor<const int*>();
test_has_trivial_copy_constructor<char[3]>();
test_has_trivial_copy_constructor<char[3]>();
test_has_trivial_copy_constructor<NotEmpty>();
test_has_trivial_copy_constructor<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp index 807e2e3a2..841fb37ec 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_default_constructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_default_constructor
#include <type_traits>
template <class T>
void test_has_trivial_default_constructor()
{
static_assert( std::has_trivial_default_constructor<T>::value, "");
static_assert( std::has_trivial_default_constructor<const T>::value, "");
static_assert( std::has_trivial_default_constructor<volatile T>::value, "");
static_assert( std::has_trivial_default_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_default_constructor()
{
static_assert(!std::has_trivial_default_constructor<T>::value, "");
static_assert(!std::has_trivial_default_constructor<const T>::value, "");
static_assert(!std::has_trivial_default_constructor<volatile T>::value, "");
static_assert(!std::has_trivial_default_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A();
};
int main()
{
test_has_not_trivial_default_constructor<void>();
test_has_not_trivial_default_constructor<int&>();
test_has_not_trivial_default_constructor<A>();
test_has_trivial_default_constructor<Union>();
test_has_trivial_default_constructor<Abstract>();
test_has_trivial_default_constructor<Empty>();
test_has_trivial_default_constructor<int>();
test_has_trivial_default_constructor<double>();
test_has_trivial_default_constructor<int*>();
test_has_trivial_default_constructor<const int*>();
test_has_trivial_default_constructor<char[3]>();
test_has_trivial_default_constructor<char[3]>();
test_has_trivial_default_constructor<NotEmpty>();
test_has_trivial_default_constructor<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_default_constructor
#include <type_traits>
template <class T>
void test_has_trivial_default_constructor()
{
static_assert( std::has_trivial_default_constructor<T>::value, "");
static_assert( std::has_trivial_default_constructor<const T>::value, "");
static_assert( std::has_trivial_default_constructor<volatile T>::value, "");
static_assert( std::has_trivial_default_constructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_default_constructor()
{
static_assert(!std::has_trivial_default_constructor<T>::value, "");
static_assert(!std::has_trivial_default_constructor<const T>::value, "");
static_assert(!std::has_trivial_default_constructor<volatile T>::value, "");
static_assert(!std::has_trivial_default_constructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A();
};
int main()
{
test_has_not_trivial_default_constructor<void>();
test_has_not_trivial_default_constructor<int&>();
test_has_not_trivial_default_constructor<A>();
test_has_trivial_default_constructor<Union>();
test_has_trivial_default_constructor<Abstract>();
test_has_trivial_default_constructor<Empty>();
test_has_trivial_default_constructor<int>();
test_has_trivial_default_constructor<double>();
test_has_trivial_default_constructor<int*>();
test_has_trivial_default_constructor<const int*>();
test_has_trivial_default_constructor<char[3]>();
test_has_trivial_default_constructor<char[3]>();
test_has_trivial_default_constructor<NotEmpty>();
test_has_trivial_default_constructor<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_destructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_destructor.pass.cpp index cacb07549..b0b09d9c8 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_destructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_destructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_destructor
#include <type_traits>
template <class T>
void test_has_trivial_destructor()
{
static_assert( std::has_trivial_destructor<T>::value, "");
static_assert( std::has_trivial_destructor<const T>::value, "");
static_assert( std::has_trivial_destructor<volatile T>::value, "");
static_assert( std::has_trivial_destructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_destructor()
{
static_assert(!std::has_trivial_destructor<T>::value, "");
static_assert(!std::has_trivial_destructor<const T>::value, "");
static_assert(!std::has_trivial_destructor<volatile T>::value, "");
static_assert(!std::has_trivial_destructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
~A();
};
int main()
{
test_has_not_trivial_destructor<void>();
test_has_not_trivial_destructor<A>();
test_has_not_trivial_destructor<Abstract>();
test_has_not_trivial_destructor<NotEmpty>();
test_has_trivial_destructor<int&>();
test_has_trivial_destructor<Union>();
test_has_trivial_destructor<Empty>();
test_has_trivial_destructor<int>();
test_has_trivial_destructor<double>();
test_has_trivial_destructor<int*>();
test_has_trivial_destructor<const int*>();
test_has_trivial_destructor<char[3]>();
test_has_trivial_destructor<char[3]>();
test_has_trivial_destructor<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_trivial_destructor
#include <type_traits>
template <class T>
void test_has_trivial_destructor()
{
static_assert( std::has_trivial_destructor<T>::value, "");
static_assert( std::has_trivial_destructor<const T>::value, "");
static_assert( std::has_trivial_destructor<volatile T>::value, "");
static_assert( std::has_trivial_destructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_trivial_destructor()
{
static_assert(!std::has_trivial_destructor<T>::value, "");
static_assert(!std::has_trivial_destructor<const T>::value, "");
static_assert(!std::has_trivial_destructor<volatile T>::value, "");
static_assert(!std::has_trivial_destructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
~A();
};
int main()
{
test_has_not_trivial_destructor<void>();
test_has_not_trivial_destructor<A>();
test_has_not_trivial_destructor<Abstract>();
test_has_not_trivial_destructor<NotEmpty>();
test_has_trivial_destructor<int&>();
test_has_trivial_destructor<Union>();
test_has_trivial_destructor<Empty>();
test_has_trivial_destructor<int>();
test_has_trivial_destructor<double>();
test_has_trivial_destructor<int*>();
test_has_trivial_destructor<const int*>();
test_has_trivial_destructor<char[3]>();
test_has_trivial_destructor<char[3]>();
test_has_trivial_destructor<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_assign.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_assign.pass.cpp index 9ca95a40c..c1d2246f4 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_assign.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_assign.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_constructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_constructor.pass.cpp index 245c5892c..d5068f549 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_constructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_trivial_move_constructor.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp index 7563806f0..05198ba13 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_virtual_destructor
#include <type_traits>
template <class T>
void test_has_virtual_destructor()
{
static_assert( std::has_virtual_destructor<T>::value, "");
static_assert( std::has_virtual_destructor<const T>::value, "");
static_assert( std::has_virtual_destructor<volatile T>::value, "");
static_assert( std::has_virtual_destructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_virtual_destructor()
{
static_assert(!std::has_virtual_destructor<T>::value, "");
static_assert(!std::has_virtual_destructor<const T>::value, "");
static_assert(!std::has_virtual_destructor<volatile T>::value, "");
static_assert(!std::has_virtual_destructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
~A();
};
int main()
{
test_has_not_virtual_destructor<void>();
test_has_not_virtual_destructor<A>();
test_has_not_virtual_destructor<int&>();
test_has_not_virtual_destructor<Union>();
test_has_not_virtual_destructor<Empty>();
test_has_not_virtual_destructor<int>();
test_has_not_virtual_destructor<double>();
test_has_not_virtual_destructor<int*>();
test_has_not_virtual_destructor<const int*>();
test_has_not_virtual_destructor<char[3]>();
test_has_not_virtual_destructor<char[3]>();
test_has_not_virtual_destructor<bit_zero>();
test_has_virtual_destructor<Abstract>();
test_has_virtual_destructor<NotEmpty>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// has_virtual_destructor
#include <type_traits>
template <class T>
void test_has_virtual_destructor()
{
static_assert( std::has_virtual_destructor<T>::value, "");
static_assert( std::has_virtual_destructor<const T>::value, "");
static_assert( std::has_virtual_destructor<volatile T>::value, "");
static_assert( std::has_virtual_destructor<const volatile T>::value, "");
}
template <class T>
void test_has_not_virtual_destructor()
{
static_assert(!std::has_virtual_destructor<T>::value, "");
static_assert(!std::has_virtual_destructor<const T>::value, "");
static_assert(!std::has_virtual_destructor<volatile T>::value, "");
static_assert(!std::has_virtual_destructor<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
~A();
};
int main()
{
test_has_not_virtual_destructor<void>();
test_has_not_virtual_destructor<A>();
test_has_not_virtual_destructor<int&>();
test_has_not_virtual_destructor<Union>();
test_has_not_virtual_destructor<Empty>();
test_has_not_virtual_destructor<int>();
test_has_not_virtual_destructor<double>();
test_has_not_virtual_destructor<int*>();
test_has_not_virtual_destructor<const int*>();
test_has_not_virtual_destructor<char[3]>();
test_has_not_virtual_destructor<char[3]>();
test_has_not_virtual_destructor<bit_zero>();
test_has_virtual_destructor<Abstract>();
test_has_virtual_destructor<NotEmpty>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp index b21304902..583cbff8f 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_abstract.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_abstract
#include <type_traits>
template <class T>
void test_is_abstract()
{
static_assert( std::is_abstract<T>::value, "");
static_assert( std::is_abstract<const T>::value, "");
static_assert( std::is_abstract<volatile T>::value, "");
static_assert( std::is_abstract<const volatile T>::value, "");
}
template <class T>
void test_is_not_abstract()
{
static_assert(!std::is_abstract<T>::value, "");
static_assert(!std::is_abstract<const T>::value, "");
static_assert(!std::is_abstract<volatile T>::value, "");
static_assert(!std::is_abstract<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
int main()
{
test_is_not_abstract<void>();
test_is_not_abstract<int&>();
test_is_not_abstract<int>();
test_is_not_abstract<double>();
test_is_not_abstract<int*>();
test_is_not_abstract<const int*>();
test_is_not_abstract<char[3]>();
test_is_not_abstract<char[3]>();
test_is_not_abstract<Union>();
test_is_not_abstract<Empty>();
test_is_not_abstract<bit_zero>();
test_is_not_abstract<NotEmpty>();
test_is_abstract<Abstract>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_abstract
#include <type_traits>
template <class T>
void test_is_abstract()
{
static_assert( std::is_abstract<T>::value, "");
static_assert( std::is_abstract<const T>::value, "");
static_assert( std::is_abstract<volatile T>::value, "");
static_assert( std::is_abstract<const volatile T>::value, "");
}
template <class T>
void test_is_not_abstract()
{
static_assert(!std::is_abstract<T>::value, "");
static_assert(!std::is_abstract<const T>::value, "");
static_assert(!std::is_abstract<volatile T>::value, "");
static_assert(!std::is_abstract<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
int main()
{
test_is_not_abstract<void>();
test_is_not_abstract<int&>();
test_is_not_abstract<int>();
test_is_not_abstract<double>();
test_is_not_abstract<int*>();
test_is_not_abstract<const int*>();
test_is_not_abstract<char[3]>();
test_is_not_abstract<char[3]>();
test_is_not_abstract<Union>();
test_is_not_abstract<Empty>();
test_is_not_abstract<bit_zero>();
test_is_not_abstract<NotEmpty>();
test_is_abstract<Abstract>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp index fc3a459ee..c56b78ba5 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_const.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_const
#include <type_traits>
template <class T>
void test_is_const()
{
static_assert(!std::is_const<T>::value, "");
static_assert( std::is_const<const T>::value, "");
static_assert(!std::is_const<volatile T>::value, "");
static_assert( std::is_const<const volatile T>::value, "");
}
int main()
{
test_is_const<void>();
test_is_const<int>();
test_is_const<double>();
test_is_const<int*>();
test_is_const<const int*>();
test_is_const<char[3]>();
test_is_const<char[3]>();
static_assert(!std::is_const<int&>::value, "");
static_assert(!std::is_const<const int&>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_const
#include <type_traits>
template <class T>
void test_is_const()
{
static_assert(!std::is_const<T>::value, "");
static_assert( std::is_const<const T>::value, "");
static_assert(!std::is_const<volatile T>::value, "");
static_assert( std::is_const<const volatile T>::value, "");
}
int main()
{
test_is_const<void>();
test_is_const<int>();
test_is_const<double>();
test_is_const<int*>();
test_is_const<const int*>();
test_is_const<char[3]>();
test_is_const<char[3]>();
static_assert(!std::is_const<int&>::value, "");
static_assert(!std::is_const<const int&>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp index 0868242ce..a4601fd9b 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// template <class T, class... Args>
// struct is_constructible;
#include <type_traits>
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
struct A
{
explicit A(int);
A(int, double);
};
#endif
int main()
{
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
static_assert((std::is_constructible<int>::value), "");
static_assert((std::is_constructible<int, const int>::value), "");
static_assert((std::is_constructible<A, int>::value), "");
static_assert((std::is_constructible<A, int, double>::value), "");
static_assert((!std::is_constructible<A>::value), "");
#endif
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// template <class T, class... Args>
// struct is_constructible;
#include <type_traits>
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
struct A
{
explicit A(int);
A(int, double);
};
#endif
int main()
{
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
static_assert((std::is_constructible<int>::value), "");
static_assert((std::is_constructible<int, const int>::value), "");
static_assert((std::is_constructible<A, int>::value), "");
static_assert((std::is_constructible<A, int, double>::value), "");
static_assert((!std::is_constructible<A>::value), "");
#endif
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp index b365dfb11..e1dc14f7e 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_empty.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_empty
#include <type_traits>
template <class T>
void test_is_empty()
{
static_assert( std::is_empty<T>::value, "");
static_assert( std::is_empty<const T>::value, "");
static_assert( std::is_empty<volatile T>::value, "");
static_assert( std::is_empty<const volatile T>::value, "");
}
template <class T>
void test_is_not_empty()
{
static_assert(!std::is_empty<T>::value, "");
static_assert(!std::is_empty<const T>::value, "");
static_assert(!std::is_empty<volatile T>::value, "");
static_assert(!std::is_empty<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
int main()
{
test_is_not_empty<void>();
test_is_not_empty<int&>();
test_is_not_empty<int>();
test_is_not_empty<double>();
test_is_not_empty<int*>();
test_is_not_empty<const int*>();
test_is_not_empty<char[3]>();
test_is_not_empty<char[3]>();
test_is_not_empty<Union>();
test_is_not_empty<NotEmpty>();
test_is_empty<Empty>();
test_is_empty<bit_zero>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_empty
#include <type_traits>
template <class T>
void test_is_empty()
{
static_assert( std::is_empty<T>::value, "");
static_assert( std::is_empty<const T>::value, "");
static_assert( std::is_empty<volatile T>::value, "");
static_assert( std::is_empty<const volatile T>::value, "");
}
template <class T>
void test_is_not_empty()
{
static_assert(!std::is_empty<T>::value, "");
static_assert(!std::is_empty<const T>::value, "");
static_assert(!std::is_empty<volatile T>::value, "");
static_assert(!std::is_empty<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
int main()
{
test_is_not_empty<void>();
test_is_not_empty<int&>();
test_is_not_empty<int>();
test_is_not_empty<double>();
test_is_not_empty<int*>();
test_is_not_empty<const int*>();
test_is_not_empty<char[3]>();
test_is_not_empty<char[3]>();
test_is_not_empty<Union>();
test_is_not_empty<NotEmpty>();
test_is_empty<Empty>();
test_is_empty<bit_zero>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp index b2827155f..cbce73730 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_literal_type
#include <type_traits>
int main()
{
static_assert( std::is_literal_type<int>::value, "");
static_assert( std::is_literal_type<const int>::value, "");
static_assert(!std::is_literal_type<int&>::value, "");
static_assert(!std::is_literal_type<volatile int&>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_literal_type
#include <type_traits>
int main()
{
static_assert( std::is_literal_type<int>::value, "");
static_assert( std::is_literal_type<const int>::value, "");
static_assert(!std::is_literal_type<int&>::value, "");
static_assert(!std::is_literal_type<volatile int&>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp index e839e0925..0974ee3aa 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// template <class T, class... Args>
// struct is_nothrow_constructible;
#include <type_traits>
#ifndef _LIBCPP_HAS_NO_VARIADICS
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
#endif
int main()
{
#ifndef _LIBCPP_HAS_NO_VARIADICS
static_assert((std::is_nothrow_constructible<int, const int>::value), "");
#endif
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// template <class T, class... Args>
// struct is_nothrow_constructible;
#include <type_traits>
#ifndef _LIBCPP_HAS_NO_VARIADICS
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
struct A
{
A(const A&);
};
#endif
int main()
{
#ifndef _LIBCPP_HAS_NO_VARIADICS
static_assert((std::is_nothrow_constructible<int, const int>::value), "");
#endif
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp index f55427906..8f783b073 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_pod.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_pod
#include <type_traits>
template <class T>
void test_is_pod()
{
static_assert( std::is_pod<T>::value, "");
static_assert( std::is_pod<const T>::value, "");
static_assert( std::is_pod<volatile T>::value, "");
static_assert( std::is_pod<const volatile T>::value, "");
}
template <class T>
void test_is_not_pod()
{
static_assert(!std::is_pod<T>::value, "");
static_assert(!std::is_pod<const T>::value, "");
static_assert(!std::is_pod<volatile T>::value, "");
static_assert(!std::is_pod<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_pod<void>();
test_is_not_pod<int&>();
test_is_not_pod<Class>();
test_is_pod<int>();
test_is_pod<double>();
test_is_pod<int*>();
test_is_pod<const int*>();
test_is_pod<char[3]>();
test_is_pod<char[3]>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_pod
#include <type_traits>
template <class T>
void test_is_pod()
{
static_assert( std::is_pod<T>::value, "");
static_assert( std::is_pod<const T>::value, "");
static_assert( std::is_pod<volatile T>::value, "");
static_assert( std::is_pod<const volatile T>::value, "");
}
template <class T>
void test_is_not_pod()
{
static_assert(!std::is_pod<T>::value, "");
static_assert(!std::is_pod<const T>::value, "");
static_assert(!std::is_pod<volatile T>::value, "");
static_assert(!std::is_pod<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_pod<void>();
test_is_not_pod<int&>();
test_is_not_pod<Class>();
test_is_pod<int>();
test_is_pod<double>();
test_is_pod<int*>();
test_is_pod<const int*>();
test_is_pod<char[3]>();
test_is_pod<char[3]>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp index b933b7e7e..07004b9fa 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_polymorphic.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_polymorphic
#include <type_traits>
template <class T>
void test_is_polymorphic()
{
static_assert( std::is_polymorphic<T>::value, "");
static_assert( std::is_polymorphic<const T>::value, "");
static_assert( std::is_polymorphic<volatile T>::value, "");
static_assert( std::is_polymorphic<const volatile T>::value, "");
}
template <class T>
void test_is_not_polymorphic()
{
static_assert(!std::is_polymorphic<T>::value, "");
static_assert(!std::is_polymorphic<const T>::value, "");
static_assert(!std::is_polymorphic<volatile T>::value, "");
static_assert(!std::is_polymorphic<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
int main()
{
test_is_not_polymorphic<void>();
test_is_not_polymorphic<int&>();
test_is_not_polymorphic<int>();
test_is_not_polymorphic<double>();
test_is_not_polymorphic<int*>();
test_is_not_polymorphic<const int*>();
test_is_not_polymorphic<char[3]>();
test_is_not_polymorphic<char[3]>();
test_is_not_polymorphic<Union>();
test_is_not_polymorphic<Empty>();
test_is_not_polymorphic<bit_zero>();
test_is_polymorphic<NotEmpty>();
test_is_polymorphic<Abstract>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_polymorphic
#include <type_traits>
template <class T>
void test_is_polymorphic()
{
static_assert( std::is_polymorphic<T>::value, "");
static_assert( std::is_polymorphic<const T>::value, "");
static_assert( std::is_polymorphic<volatile T>::value, "");
static_assert( std::is_polymorphic<const volatile T>::value, "");
}
template <class T>
void test_is_not_polymorphic()
{
static_assert(!std::is_polymorphic<T>::value, "");
static_assert(!std::is_polymorphic<const T>::value, "");
static_assert(!std::is_polymorphic<volatile T>::value, "");
static_assert(!std::is_polymorphic<const volatile T>::value, "");
}
class Empty
{
};
class NotEmpty
{
virtual ~NotEmpty();
};
union Union {};
struct bit_zero
{
int : 0;
};
class Abstract
{
virtual ~Abstract() = 0;
};
int main()
{
test_is_not_polymorphic<void>();
test_is_not_polymorphic<int&>();
test_is_not_polymorphic<int>();
test_is_not_polymorphic<double>();
test_is_not_polymorphic<int*>();
test_is_not_polymorphic<const int*>();
test_is_not_polymorphic<char[3]>();
test_is_not_polymorphic<char[3]>();
test_is_not_polymorphic<Union>();
test_is_not_polymorphic<Empty>();
test_is_not_polymorphic<bit_zero>();
test_is_polymorphic<NotEmpty>();
test_is_polymorphic<Abstract>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp index 53d788228..0416e3a96 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_signed
#include <type_traits>
template <class T>
void test_is_signed()
{
static_assert( std::is_signed<T>::value, "");
static_assert( std::is_signed<const T>::value, "");
static_assert( std::is_signed<volatile T>::value, "");
static_assert( std::is_signed<const volatile T>::value, "");
}
template <class T>
void test_is_not_signed()
{
static_assert(!std::is_signed<T>::value, "");
static_assert(!std::is_signed<const T>::value, "");
static_assert(!std::is_signed<volatile T>::value, "");
static_assert(!std::is_signed<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_signed<void>();
test_is_not_signed<int&>();
test_is_not_signed<Class>();
test_is_not_signed<int*>();
test_is_not_signed<const int*>();
test_is_not_signed<char[3]>();
test_is_not_signed<char[3]>();
test_is_not_signed<bool>();
test_is_not_signed<unsigned>();
test_is_signed<int>();
test_is_signed<double>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_signed
#include <type_traits>
template <class T>
void test_is_signed()
{
static_assert( std::is_signed<T>::value, "");
static_assert( std::is_signed<const T>::value, "");
static_assert( std::is_signed<volatile T>::value, "");
static_assert( std::is_signed<const volatile T>::value, "");
}
template <class T>
void test_is_not_signed()
{
static_assert(!std::is_signed<T>::value, "");
static_assert(!std::is_signed<const T>::value, "");
static_assert(!std::is_signed<volatile T>::value, "");
static_assert(!std::is_signed<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_signed<void>();
test_is_not_signed<int&>();
test_is_not_signed<Class>();
test_is_not_signed<int*>();
test_is_not_signed<const int*>();
test_is_not_signed<char[3]>();
test_is_not_signed<char[3]>();
test_is_not_signed<bool>();
test_is_not_signed<unsigned>();
test_is_signed<int>();
test_is_signed<double>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp index f88d2e697..ede3b834a 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_standard_layout.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_standard_layout
#include <type_traits>
int main()
{
static_assert( std::is_standard_layout<int>::value, "");
static_assert(!std::is_standard_layout<int&>::value, "");
static_assert(!std::is_standard_layout<volatile int&>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_standard_layout
#include <type_traits>
int main()
{
static_assert( std::is_standard_layout<int>::value, "");
static_assert(!std::is_standard_layout<int&>::value, "");
static_assert(!std::is_standard_layout<volatile int&>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp index 484bfaaba..3a48ccab2 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivial.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_trivial
#include <type_traits>
int main()
{
static_assert( std::is_trivial<int>::value, "");
static_assert(!std::is_trivial<int&>::value, "");
static_assert(!std::is_trivial<volatile int&>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_trivial
#include <type_traits>
int main()
{
static_assert( std::is_trivial<int>::value, "");
static_assert(!std::is_trivial<int&>::value, "");
static_assert(!std::is_trivial<volatile int&>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable.pass.cpp index 872b23442..b589c2b92 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_trivialially_copyable.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_trivially_copyable
#include <type_traits>
#include <cassert>
struct A
{
int i_;
};
struct B
{
int i_;
~B() {assert(i_ == 0);}
};
int main()
{
static_assert( std::is_trivially_copyable<int>::value, "");
static_assert( std::is_trivially_copyable<const int>::value, "");
static_assert(!std::is_trivially_copyable<int&>::value, "");
static_assert( std::is_trivially_copyable<A>::value, "");
static_assert( std::is_trivially_copyable<const A>::value, "");
static_assert(!std::is_trivially_copyable<const A&>::value, "");
static_assert(!std::is_trivially_copyable<B>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_trivially_copyable
#include <type_traits>
#include <cassert>
struct A
{
int i_;
};
struct B
{
int i_;
~B() {assert(i_ == 0);}
};
int main()
{
static_assert( std::is_trivially_copyable<int>::value, "");
static_assert( std::is_trivially_copyable<const int>::value, "");
static_assert(!std::is_trivially_copyable<int&>::value, "");
static_assert( std::is_trivially_copyable<A>::value, "");
static_assert( std::is_trivially_copyable<const A>::value, "");
static_assert(!std::is_trivially_copyable<const A&>::value, "");
static_assert(!std::is_trivially_copyable<B>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp index 8d6b6b0f6..9967cc4ab 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_unsigned
#include <type_traits>
template <class T>
void test_is_unsigned()
{
static_assert( std::is_unsigned<T>::value, "");
static_assert( std::is_unsigned<const T>::value, "");
static_assert( std::is_unsigned<volatile T>::value, "");
static_assert( std::is_unsigned<const volatile T>::value, "");
}
template <class T>
void test_is_not_unsigned()
{
static_assert(!std::is_unsigned<T>::value, "");
static_assert(!std::is_unsigned<const T>::value, "");
static_assert(!std::is_unsigned<volatile T>::value, "");
static_assert(!std::is_unsigned<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_unsigned<void>();
test_is_not_unsigned<int&>();
test_is_not_unsigned<Class>();
test_is_not_unsigned<int*>();
test_is_not_unsigned<const int*>();
test_is_not_unsigned<char[3]>();
test_is_not_unsigned<char[3]>();
test_is_not_unsigned<int>();
test_is_not_unsigned<double>();
test_is_unsigned<bool>();
test_is_unsigned<unsigned>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_unsigned
#include <type_traits>
template <class T>
void test_is_unsigned()
{
static_assert( std::is_unsigned<T>::value, "");
static_assert( std::is_unsigned<const T>::value, "");
static_assert( std::is_unsigned<volatile T>::value, "");
static_assert( std::is_unsigned<const volatile T>::value, "");
}
template <class T>
void test_is_not_unsigned()
{
static_assert(!std::is_unsigned<T>::value, "");
static_assert(!std::is_unsigned<const T>::value, "");
static_assert(!std::is_unsigned<volatile T>::value, "");
static_assert(!std::is_unsigned<const volatile T>::value, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_is_not_unsigned<void>();
test_is_not_unsigned<int&>();
test_is_not_unsigned<Class>();
test_is_not_unsigned<int*>();
test_is_not_unsigned<const int*>();
test_is_not_unsigned<char[3]>();
test_is_not_unsigned<char[3]>();
test_is_not_unsigned<int>();
test_is_not_unsigned<double>();
test_is_unsigned<bool>();
test_is_unsigned<unsigned>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp index 19b2cfa27..00ff887e6 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/is_volatile.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_volatile
#include <type_traits>
template <class T>
void test_is_volatile()
{
static_assert(!std::is_volatile<T>::value, "");
static_assert(!std::is_volatile<const T>::value, "");
static_assert( std::is_volatile<volatile T>::value, "");
static_assert( std::is_volatile<const volatile T>::value, "");
}
int main()
{
test_is_volatile<void>();
test_is_volatile<int>();
test_is_volatile<double>();
test_is_volatile<int*>();
test_is_volatile<const int*>();
test_is_volatile<char[3]>();
test_is_volatile<char[3]>();
static_assert(!std::is_volatile<int&>::value, "");
static_assert(!std::is_volatile<volatile int&>::value, "");
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// is_volatile
#include <type_traits>
template <class T>
void test_is_volatile()
{
static_assert(!std::is_volatile<T>::value, "");
static_assert(!std::is_volatile<const T>::value, "");
static_assert( std::is_volatile<volatile T>::value, "");
static_assert( std::is_volatile<const volatile T>::value, "");
}
int main()
{
test_is_volatile<void>();
test_is_volatile<int>();
test_is_volatile<double>();
test_is_volatile<int*>();
test_is_volatile<const int*>();
test_is_volatile<char[3]>();
test_is_volatile<char[3]>();
static_assert(!std::is_volatile<int&>::value, "");
static_assert(!std::is_volatile<volatile int&>::value, "");
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/meta.unary.prop/rank.pass.cpp b/test/utilities/meta/meta.unary/meta.unary.prop/rank.pass.cpp index bfb96b22c..0cd61f685 100644 --- a/test/utilities/meta/meta.unary/meta.unary.prop/rank.pass.cpp +++ b/test/utilities/meta/meta.unary/meta.unary.prop/rank.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rank
#include <type_traits>
template <class T, unsigned A>
void test_rank()
{
static_assert( std::rank<T>::value == A, "");
static_assert( std::rank<const T>::value == A, "");
static_assert( std::rank<volatile T>::value == A, "");
static_assert( std::rank<const volatile T>::value == A, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_rank<void, 0>();
test_rank<int&, 0>();
test_rank<Class, 0>();
test_rank<int*, 0>();
test_rank<const int*, 0>();
test_rank<int, 0>();
test_rank<double, 0>();
test_rank<bool, 0>();
test_rank<unsigned, 0>();
test_rank<char[3], 1>();
test_rank<char[][3], 2>();
test_rank<char[][4][3], 3>();
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// type_traits
// rank
#include <type_traits>
template <class T, unsigned A>
void test_rank()
{
static_assert( std::rank<T>::value == A, "");
static_assert( std::rank<const T>::value == A, "");
static_assert( std::rank<volatile T>::value == A, "");
static_assert( std::rank<const volatile T>::value == A, "");
}
class Class
{
public:
~Class();
};
int main()
{
test_rank<void, 0>();
test_rank<int&, 0>();
test_rank<Class, 0>();
test_rank<int*, 0>();
test_rank<const int*, 0>();
test_rank<int, 0>();
test_rank<double, 0>();
test_rank<bool, 0>();
test_rank<unsigned, 0>();
test_rank<char[3], 1>();
test_rank<char[][3], 2>();
test_rank<char[][4][3], 3>();
}
\ No newline at end of file diff --git a/test/utilities/meta/meta.unary/nothing_to_do.pass.cpp b/test/utilities/meta/meta.unary/nothing_to_do.pass.cpp index 923482612..e8db90cbe 100644 --- a/test/utilities/meta/meta.unary/nothing_to_do.pass.cpp +++ b/test/utilities/meta/meta.unary/nothing_to_do.pass.cpp @@ -1 +1 @@ -//===----------------------------------------------------------------------===//
//
// ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
int main()
{
}
\ No newline at end of file +//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
int main()
{
}
\ No newline at end of file |