28 #ifndef VC_TRAITS_HAS_NO_ALLOCATED_DATA_H_
29 #define VC_TRAITS_HAS_NO_ALLOCATED_DATA_H_
33 namespace Vc_VERSIONED_NAMESPACE
72 typename std::remove_cv<typename std::remove_reference<T>::type>::type>
78 template<
typename T, std::
size_t N>
struct has_no_allocated_data_impl<T[N]> :
public std::true_type {};
79 template<
typename T>
struct has_no_allocated_data_impl<T[]> :
public std::true_type {};
82 static_assert(has_no_allocated_data<
int[256]>::value,
"");
83 static_assert(has_no_allocated_data<
const int[256]>::value,
"");
84 static_assert(has_no_allocated_data<
volatile int[256]>::value,
"");
85 static_assert(has_no_allocated_data<
const volatile int[256]>::value,
"");
87 static_assert(has_no_allocated_data<
int[]>::value,
"");
88 static_assert(has_no_allocated_data<
int[2][2]>::value,
"");
90 static_assert(has_no_allocated_data<
const volatile std::array<int, 256> &>::value,
"");
91 static_assert(has_no_allocated_data<
const volatile std::array<int, 256>>::value,
"");
92 static_assert(has_no_allocated_data<
volatile std::array<int, 256> &>::value,
"");
93 static_assert(has_no_allocated_data<
volatile std::array<int, 256>>::value,
"");
94 static_assert(has_no_allocated_data<
const std::array<int, 256> &>::value,
"");
95 static_assert(has_no_allocated_data<
const std::array<int, 256>>::value,
"");
96 static_assert(has_no_allocated_data<std::array<int, 256>>::value,
"");
97 static_assert(has_no_allocated_data<std::array<int, 256> &&>::value,
"");
98 static_assert(!has_no_allocated_data<int*>::value,
"");
99 static_assert(!has_no_allocated_data<const int*>::value,
"");
100 static_assert(!has_no_allocated_data<const int *const>::value,
"");
101 static_assert(!has_no_allocated_data<int *const>::value,
"");
106 #endif // VC_TRAITS_HAS_NO_ALLOCATED_DATA_H_
Implements the has_no_allocated_data trait.
Type trait that tells whether a container stores its data inside the object or inside allocated memor...