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
41template <
typename T,
size_t N>
class array;
43template <
typename T,
size_t N>
struct array;
45template <
typename T,
typename Allocator>
class vector;
46#ifdef _LIBCPP_END_NAMESPACE_STD
47_LIBCPP_END_NAMESPACE_STD
52namespace Vc_VERSIONED_NAMESPACE
56namespace has_contiguous_storage_detail
60template <
typename T,
typename It =
typename T::iterator>
61std::is_base_of<std::random_access_iterator_tag,
62 typename std::iterator_traits<It>::iterator_category>
67std::is_base_of<std::random_access_iterator_tag,
68 typename std::iterator_traits<T>::iterator_category>
72template <
typename T> std::false_type test(...);
76struct has_contiguous_storage_impl
77 :
public decltype(has_contiguous_storage_detail::test<T>(int())) {
81struct has_contiguous_storage
82 :
public has_contiguous_storage_impl<
83 typename std::remove_cv<typename std::remove_reference<T>::type>::type>
88template <
typename T>
struct has_contiguous_storage_impl<const T *> :
public std::true_type {};
89template <
typename T>
struct has_contiguous_storage_impl<T *> :
public std::true_type {};
90template <
typename T>
struct has_contiguous_storage_impl<std::unique_ptr<T[]>> :
public std::true_type {};
91template <
typename T>
struct has_contiguous_storage_impl<std::initializer_list<T>> :
public std::true_type {};
92template <
typename T, std::
size_t N>
struct has_contiguous_storage_impl<T[N]> :
public std::true_type {};
93template <
typename T, std::
size_t N>
struct has_contiguous_storage_impl<std::array<T, N>> :
public std::true_type {};
94template <
typename T,
typename A>
struct has_contiguous_storage_impl<std::
vector<T, A>> :
public std::true_type {};
Common::AdaptSubscriptOperator< std::vector< T, Allocator > > vector
An adapted std::vector container with an additional subscript operator which implements gather and sc...