28 #ifndef VC_TRAITS_HAS_CONTIGUOUS_STORAGE_H_
29 #define VC_TRAITS_HAS_CONTIGUOUS_STORAGE_H_
31 #include <initializer_list>
34 #ifdef _LIBCPP_BEGIN_NAMESPACE_STD
35 _LIBCPP_BEGIN_NAMESPACE_STD
41 template <
typename T,
size_t N>
class array;
43 template <
typename T,
size_t N>
struct array;
45 template <
typename T,
typename Allocator>
class vector;
46 #ifdef _LIBCPP_END_NAMESPACE_STD
47 _LIBCPP_END_NAMESPACE_STD
52 namespace Vc_VERSIONED_NAMESPACE
56 namespace has_contiguous_storage_detail
58 template <
typename T,
typename It =
typename T::iterator>
59 std::is_base_of<std::random_access_iterator_tag,
60 typename It::iterator_category>
64 std::is_base_of<std::random_access_iterator_tag,
65 typename T::iterator_category>
68 template <
typename T> std::false_type test(...);
72 struct has_contiguous_storage_impl
73 :
public decltype(has_contiguous_storage_detail::test<T>(int())) {
77 struct has_contiguous_storage
78 :
public has_contiguous_storage_impl<
79 typename std::remove_cv<typename std::remove_reference<T>::type>::type>
84 template <
typename T>
struct has_contiguous_storage_impl<const T *> :
public std::true_type {};
85 template <
typename T>
struct has_contiguous_storage_impl<T *> :
public std::true_type {};
86 template <
typename T>
struct has_contiguous_storage_impl<
std::unique_ptr<T[]>> :
public std::true_type {};
87 template <
typename T>
struct has_contiguous_storage_impl<
std::initializer_list<T>> :
public std::true_type {};
88 template <
typename T, std::
size_t N>
struct has_contiguous_storage_impl<T[N]> :
public std::true_type {};
89 template <
typename T, std::
size_t N>
struct has_contiguous_storage_impl<
std::array<T, N>> :
public std::true_type {};
90 template <
typename T,
typename A>
struct has_contiguous_storage_impl<
std::
vector<T, A>> :
public std::true_type {};
95 #endif // VC_TRAITS_HAS_CONTIGUOUS_STORAGE_H_
Common::AdaptSubscriptOperator< std::vector< T, Allocator >> vector
An adapted std::vector container with an additional subscript operator which implements gather and sc...