mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
change hash adapt
This commit is contained in:
parent
a7532930e3
commit
36e0b187c0
17 changed files with 505 additions and 220 deletions
63
sprout/container/boost/array.hpp
Normal file
63
sprout/container/boost/array.hpp
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*=============================================================================
|
||||
Copyright (c) 2011-2016 Bolero MURAKAMI
|
||||
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)
|
||||
=============================================================================*/
|
||||
#ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP
|
||||
#define SPROUT_CONTAINER_BOOST_ARRAY_HPP
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <sprout/config.hpp>
|
||||
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
||||
# include <type_traits>
|
||||
# include <sprout/workaround/std/cstddef.hpp>
|
||||
# include <sprout/container/traits.hpp>
|
||||
# include <sprout/iterator/index_iterator.hpp>
|
||||
#endif
|
||||
|
||||
#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION
|
||||
namespace sprout {
|
||||
//
|
||||
// container_traits
|
||||
//
|
||||
template<typename T, std::size_t N>
|
||||
struct container_traits<boost::array<T, N> >
|
||||
: public sprout::detail::container_traits_default<boost::array<T, N> >
|
||||
{
|
||||
public:
|
||||
typedef sprout::index_iterator<boost::array<T, N>&, true> iterator;
|
||||
typedef sprout::index_iterator<boost::array<T, N> const&, true> const_iterator;
|
||||
};
|
||||
|
||||
//
|
||||
// container_range_traits
|
||||
//
|
||||
template<typename T, std::size_t N>
|
||||
struct container_range_traits<boost::array<T, N> >
|
||||
: public sprout::detail::container_range_traits_default<boost::array<T, N> >
|
||||
{
|
||||
public:
|
||||
static SPROUT_CONSTEXPR typename sprout::container_traits<boost::array<T, N> >::iterator
|
||||
range_begin(boost::array<T, N>& cont) {
|
||||
return typename sprout::container_traits<boost::array<T, N> >::iterator(cont, 0);
|
||||
}
|
||||
static SPROUT_CONSTEXPR typename sprout::container_traits<boost::array<T, N> const>::iterator
|
||||
range_begin(boost::array<T, N> const& cont) {
|
||||
return typename sprout::container_traits<boost::array<T, N> const>::iterator(cont, 0);
|
||||
}
|
||||
|
||||
static SPROUT_CONSTEXPR typename sprout::container_traits<boost::array<T, N> >::iterator
|
||||
range_end(boost::array<T, N>& cont) {
|
||||
return typename sprout::container_traits<boost::array<T, N> >::iterator(cont, cont.size());
|
||||
}
|
||||
static SPROUT_CONSTEXPR typename sprout::container_traits<boost::array<T, N> const>::iterator
|
||||
range_end(boost::array<T, N> const& cont) {
|
||||
return typename sprout::container_traits<boost::array<T, N> const>::iterator(cont, cont.size());
|
||||
}
|
||||
};
|
||||
} // namespace sprout
|
||||
#endif
|
||||
|
||||
#endif // #ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP
|
Loading…
Add table
Add a link
Reference in a new issue