2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2016-02-25 09:48:28 +00:00
|
|
|
Copyright (c) 2011-2016 Bolero MURAKAMI
|
2013-08-08 09:54:33 +00:00
|
|
|
https://github.com/bolero-MURAKAMI/Sprout
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
=============================================================================*/
|
2013-01-13 16:13:48 +00:00
|
|
|
#ifndef SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP
|
|
|
|
#define SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP
|
|
|
|
|
|
|
|
#include <sscrisk/cel/array.hpp>
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
|
|
|
# include <type_traits>
|
2014-04-30 07:30:26 +00:00
|
|
|
# include <sprout/workaround/std/cstddef.hpp>
|
2013-01-13 16:13:48 +00:00
|
|
|
# include <sprout/container/traits.hpp>
|
|
|
|
# include <sprout/iterator/index_iterator.hpp>
|
2016-04-17 10:36:56 +00:00
|
|
|
# include <sprout/detail/functional/const_subscript.hpp>
|
2013-01-13 16:13:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
|
|
|
namespace sprout {
|
|
|
|
//
|
|
|
|
// container_traits
|
|
|
|
//
|
|
|
|
template<typename T, std::size_t N>
|
|
|
|
struct container_traits<sscrisk::cel::array<T, N> >
|
|
|
|
: public sprout::detail::container_traits_default<sscrisk::cel::array<T, N> >
|
|
|
|
{
|
|
|
|
public:
|
2016-04-17 10:36:56 +00:00
|
|
|
typedef sprout::index_iterator<sscrisk::cel::array<T, N>&, true, sprout::detail::const_subscript<> > iterator;
|
|
|
|
typedef sprout::index_iterator<sscrisk::cel::array<T, N> const&, true, sprout::detail::const_subscript<> > const_iterator;
|
2013-01-13 16:13:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
2013-04-22 04:04:27 +00:00
|
|
|
// container_range_traits
|
2013-01-13 16:13:48 +00:00
|
|
|
//
|
|
|
|
template<typename T, std::size_t N>
|
2013-04-22 04:04:27 +00:00
|
|
|
struct container_range_traits<sscrisk::cel::array<T, N> > {
|
|
|
|
public:
|
|
|
|
static SPROUT_CONSTEXPR typename sprout::container_traits<sscrisk::cel::array<T, N> >::iterator
|
|
|
|
range_begin(sscrisk::cel::array<T, N>& cont) {
|
|
|
|
return typename sprout::container_traits<sscrisk::cel::array<T, N> >::iterator(cont, 0);
|
|
|
|
}
|
|
|
|
static SPROUT_CONSTEXPR typename sprout::container_traits<sscrisk::cel::array<T, N> const>::iterator
|
|
|
|
range_begin(sscrisk::cel::array<T, N> const& cont) {
|
|
|
|
return typename sprout::container_traits<sscrisk::cel::array<T, N> const>::iterator(cont, 0);
|
|
|
|
}
|
2013-01-13 16:13:48 +00:00
|
|
|
|
2013-04-22 04:04:27 +00:00
|
|
|
static SPROUT_CONSTEXPR typename sprout::container_traits<sscrisk::cel::array<T, N> >::iterator
|
|
|
|
range_end(sscrisk::cel::array<T, N>& cont) {
|
|
|
|
return typename sprout::container_traits<sscrisk::cel::array<T, N> >::iterator(cont, cont.size());
|
|
|
|
}
|
|
|
|
static SPROUT_CONSTEXPR typename sprout::container_traits<sscrisk::cel::array<T, N> const>::iterator
|
|
|
|
range_end(sscrisk::cel::array<T, N> const& cont) {
|
|
|
|
return typename sprout::container_traits<sscrisk::cel::array<T, N> const>::iterator(cont, cont.size());
|
|
|
|
}
|
|
|
|
};
|
2013-01-13 16:13:48 +00:00
|
|
|
} // namespace sprout
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_CONTAINER_SSCRISK_CEL_ARRAY_HPP
|