mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-01-21 20:36:37 +00:00
sprout::index_t 追加
This commit is contained in:
parent
c9471df964
commit
d5dcbaf4b2
44 changed files with 80 additions and 101 deletions
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type copy_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type copy_backward_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_FILL_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_FILL_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -12,7 +11,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Container>::type fill_impl(
|
||||
Container const& cont,
|
||||
T const& value,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_REPLACE_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -17,7 +16,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type replace_copy_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_REPLACE_COPY_IF_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, typename T, typename Predicate, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, typename T, typename Predicate, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type replace_copy_if_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_REVERSE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_REVERSE_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type reverse_copy_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_ROTATE_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_ROTATE_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type rotate_copy_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator middle,
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace sprout {
|
|||
: sprout::array<std::ptrdiff_t, N>{{}}
|
||||
;
|
||||
}
|
||||
template<typename Container, typename Shuffled, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, typename Shuffled, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Container>::type shuffle_impl_1(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
@ -72,7 +72,7 @@ namespace sprout {
|
|||
)...
|
||||
);
|
||||
}
|
||||
template<typename Container, typename UniformRandomNumberGenerator, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, typename UniformRandomNumberGenerator, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Container>::type shuffle_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...> indexes,
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace sprout {
|
|||
)
|
||||
;
|
||||
}
|
||||
template<typename UniformRandomNumberGenerator, typename Container, typename Shuffled, std::ptrdiff_t... Indexes>
|
||||
template<typename UniformRandomNumberGenerator, typename Container, typename Shuffled, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::tuples::tuple<
|
||||
typename sprout::fixed::result_of::algorithm<Container>::type,
|
||||
typename std::decay<UniformRandomNumberGenerator>::type
|
||||
|
@ -102,7 +102,7 @@ namespace sprout {
|
|||
sprout::tuples::get<1>(shuffled)
|
||||
);
|
||||
}
|
||||
template<typename Container, typename UniformRandomNumberGenerator, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, typename UniformRandomNumberGenerator, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::tuples::tuple<
|
||||
typename sprout::fixed::result_of::algorithm<Container>::type,
|
||||
typename std::decay<UniformRandomNumberGenerator>::type
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_SWAP_ELEMENT_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type swap_element_copy_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_ALGORITHM_FIXED_TRANSFORM_HPP
|
||||
#define SPROUT_ALGORITHM_FIXED_TRANSFORM_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
@ -16,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator, typename Result, typename UnaryOperation, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator, typename Result, typename UnaryOperation, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type transform_impl_ra(
|
||||
RandomAccessIterator first,
|
||||
RandomAccessIterator last,
|
||||
|
@ -118,7 +117,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Result, typename BinaryOperation, std::ptrdiff_t... Indexes>
|
||||
template<typename RandomAccessIterator1, typename RandomAccessIterator2, typename Result, typename BinaryOperation, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type transform_impl_ra(
|
||||
RandomAccessIterator1 first1,
|
||||
RandomAccessIterator1 last1,
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename T, std::size_t N, std::ptrdiff_t...Indexes>
|
||||
template<typename T, std::size_t N, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::array<T, N> to_array_impl(
|
||||
T const (& arr)[N],
|
||||
sprout::index_tuple<Indexes...>
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace sprout {
|
|||
|
||||
template<typename IndexTuple, typename... Args>
|
||||
struct deduce_domain_impl;
|
||||
template<typename... Args, std::ptrdiff_t... Indexes>
|
||||
template<typename... Args, sprout::index_t... Indexes>
|
||||
struct deduce_domain_impl<sprout::index_tuple<Indexes...>, Args...>
|
||||
: public sprout::breed::detail::common_domain<
|
||||
typename sprout::breed::domain_of<
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace sprout {
|
|||
typedef sprout::breed::expr<Tag, src_args, N> src_type;
|
||||
typedef sprout::breed::expr<Tag, dst_args, N> type;
|
||||
private:
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
static SPROUT_CONSTEXPR type call_impl(src_type const& e, sprout::index_tuple<Indexes...>) {
|
||||
return type(e.template child<Indexes>()...);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace sprout {
|
|||
typedef sprout::breed::basic_expr<Tag, src_args, N> src_type;
|
||||
typedef sprout::breed::basic_expr<Tag, dst_args, N> type;
|
||||
private:
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
static SPROUT_CONSTEXPR type call_impl(src_type const& e, sprout::index_tuple<Indexes...>) {
|
||||
return type(e.template child<Indexes>()...);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_BREED_TRANSFORM_PASS_THROUGH_HPP
|
||||
#define SPROUT_BREED_TRANSFORM_PASS_THROUGH_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
|
@ -28,7 +27,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple>
|
||||
struct list_impl {};
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
struct list_impl<sprout::index_tuple<Indexes...> > {
|
||||
public:
|
||||
typedef sprout::breed::list<
|
||||
|
@ -50,7 +49,7 @@ namespace sprout {
|
|||
breed_generator(expr_type)
|
||||
>::type result_type;
|
||||
private:
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR result_type call_impl(
|
||||
typename pass_through_impl::expr_param e,
|
||||
typename pass_through_impl::state_param s,
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace sprout {
|
|||
typename Camera,
|
||||
typename Objects,
|
||||
typename Lights,
|
||||
std::ptrdiff_t... XIndexes
|
||||
sprout::index_t... XIndexes
|
||||
>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed_container_traits<Pixels>::value_type
|
||||
generate_impl_line(
|
||||
|
@ -71,7 +71,7 @@ namespace sprout {
|
|||
typename Camera,
|
||||
typename Objects,
|
||||
typename Lights,
|
||||
std::ptrdiff_t... YIndexes
|
||||
sprout::index_t... YIndexes
|
||||
>
|
||||
SPROUT_CONSTEXPR inline Pixels
|
||||
generate_impl(
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_FUNCTIONAL_DFT_FIXED_DFT_HPP
|
||||
#define SPROUT_FUNCTIONAL_DFT_FIXED_DFT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -14,7 +13,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type dft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_FUNCTIONAL_DFT_FIXED_IDFT_HPP
|
||||
#define SPROUT_FUNCTIONAL_DFT_FIXED_IDFT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -14,7 +13,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename InputIterator, typename Result, std::ptrdiff_t... Indexes>
|
||||
template<typename InputIterator, typename Result, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Result>::type idft_impl(
|
||||
InputIterator first,
|
||||
InputIterator last,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename Container, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Container>::type bitrev_table_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -5,19 +5,24 @@
|
|||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// index_t
|
||||
//
|
||||
typedef std::ptrdiff_t index_t;
|
||||
|
||||
//
|
||||
// index_tuple
|
||||
//
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
struct index_tuple {};
|
||||
|
||||
//
|
||||
// index_range
|
||||
//
|
||||
template<
|
||||
std::ptrdiff_t First,
|
||||
std::ptrdiff_t Last,
|
||||
std::ptrdiff_t Step = 1,
|
||||
sprout::index_t First,
|
||||
sprout::index_t Last,
|
||||
sprout::index_t Step = 1,
|
||||
typename Acc = sprout::index_tuple<>,
|
||||
bool Break = (First >= Last)
|
||||
>
|
||||
|
@ -25,10 +30,10 @@ namespace sprout {
|
|||
typedef Acc type;
|
||||
};
|
||||
template<
|
||||
std::ptrdiff_t First,
|
||||
std::ptrdiff_t Last,
|
||||
std::ptrdiff_t Step,
|
||||
std::ptrdiff_t... Indexes
|
||||
sprout::index_t First,
|
||||
sprout::index_t Last,
|
||||
sprout::index_t Step,
|
||||
sprout::index_t... Indexes
|
||||
>
|
||||
struct index_range<First, Last, Step, sprout::index_tuple<Indexes...>, false>
|
||||
: public sprout::index_range<First + Step, Last, Step, sprout::index_tuple<Indexes..., First> >
|
||||
|
@ -38,8 +43,8 @@ namespace sprout {
|
|||
// index_n
|
||||
//
|
||||
template<
|
||||
std::ptrdiff_t I,
|
||||
std::ptrdiff_t N,
|
||||
sprout::index_t I,
|
||||
sprout::index_t N,
|
||||
typename Acc = sprout::index_tuple<>,
|
||||
bool Break = (N == 0)
|
||||
>
|
||||
|
@ -47,9 +52,9 @@ namespace sprout {
|
|||
typedef Acc type;
|
||||
};
|
||||
template<
|
||||
std::ptrdiff_t I,
|
||||
std::ptrdiff_t N,
|
||||
std::ptrdiff_t... Indexes
|
||||
sprout::index_t I,
|
||||
sprout::index_t N,
|
||||
sprout::index_t... Indexes
|
||||
>
|
||||
struct index_n<I, N, sprout::index_tuple<Indexes...>, false>
|
||||
: public sprout::index_n<I, N - 1, sprout::index_tuple<Indexes..., I> >
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_NUMERIC_FIXED_IOTA_HPP
|
||||
#define SPROUT_NUMERIC_FIXED_IOTA_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -12,7 +11,7 @@
|
|||
namespace sprout {
|
||||
namespace fixed {
|
||||
namespace detail {
|
||||
template<typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline typename sprout::fixed::result_of::algorithm<Container>::type iota_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_APPEND_HPP
|
||||
#define SPROUT_OPERATION_FIXED_APPEND_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -27,7 +26,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename Input, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename Input, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result append_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_ERASE_HPP
|
||||
#define SPROUT_OPERATION_FIXED_ERASE_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -28,7 +27,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result erase_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<std::size_t N, typename Result, typename Container, std::ptrdiff_t... Indexes>
|
||||
template<std::size_t N, typename Result, typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result erase_n_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_INSERT_HPP
|
||||
#define SPROUT_OPERATION_FIXED_INSERT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
|
@ -29,7 +28,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename T, typename... Values, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename T, typename... Values, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result insert_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<std::size_t N, typename Result, typename Container, typename T, typename... Values, std::ptrdiff_t... Indexes>
|
||||
template<std::size_t N, typename Result, typename Container, typename T, typename... Values, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result insert_n_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_REALIGN_HPP
|
||||
#define SPROUT_OPERATION_FIXED_REALIGN_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -22,7 +21,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result realign_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
@ -56,7 +55,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result realign_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result resize_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
@ -60,7 +60,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result resize_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result resize_backward_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
@ -61,7 +61,7 @@ namespace sprout {
|
|||
}
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result resize_backward_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_OPERATION_FIXED_SET_HPP
|
||||
#define SPROUT_OPERATION_FIXED_SET_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/fixed_container/traits.hpp>
|
||||
|
@ -23,7 +22,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Container, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Container, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result set_impl(
|
||||
Container const& cont,
|
||||
sprout::index_tuple<Indexes...>,
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace sprout {
|
|||
n2
|
||||
);
|
||||
}
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
static SPROUT_CONSTEXPR basic_string<T, N, Traits> from_c_str_impl(
|
||||
value_type const* s,
|
||||
size_type n,
|
||||
|
@ -255,7 +255,7 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
#endif
|
||||
template<std::size_t M, std::ptrdiff_t... Indexes>
|
||||
template<std::size_t M, sprout::index_t... Indexes>
|
||||
static SPROUT_CONSTEXPR basic_string<T, sizeof...(Indexes), Traits> implicit_conversion_impl(
|
||||
T const(& elems)[M],
|
||||
size_type len,
|
||||
|
@ -833,7 +833,7 @@ namespace sprout {
|
|||
// to_string
|
||||
//
|
||||
namespace detail {
|
||||
template<typename T, std::size_t N, std::ptrdiff_t... Indexes>
|
||||
template<typename T, std::size_t N, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::basic_string<T, N - 1> to_string_impl_1(
|
||||
T const(& arr)[N],
|
||||
typename sprout::basic_string<T, N - 1>::size_type n,
|
||||
|
@ -842,7 +842,7 @@ namespace sprout {
|
|||
{
|
||||
return sprout::basic_string<T, N - 1>{{(Indexes < n ? arr[Indexes] : T())...}, n};
|
||||
}
|
||||
template<typename T, std::size_t N, std::ptrdiff_t... Indexes>
|
||||
template<typename T, std::size_t N, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::basic_string<T, N - 1> to_string_impl(
|
||||
T const(& arr)[N],
|
||||
sprout::index_tuple<Indexes...>
|
||||
|
@ -872,7 +872,7 @@ namespace sprout {
|
|||
// make_string
|
||||
//
|
||||
namespace detail {
|
||||
template<typename T, std::size_t N, std::ptrdiff_t... Indexes>
|
||||
template<typename T, std::size_t N, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::basic_string<T, N - 1> make_string_impl_1(
|
||||
sprout::array<T, N> const& arr,
|
||||
std::size_t n,
|
||||
|
@ -881,7 +881,7 @@ namespace sprout {
|
|||
{
|
||||
return sprout::basic_string<T, N - 1>{{(Indexes < n ? arr[Indexes] : T())...}, n};
|
||||
}
|
||||
template<typename T, std::size_t N, std::ptrdiff_t... Indexes>
|
||||
template<typename T, std::size_t N, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::basic_string<T, N - 1> make_string_impl(
|
||||
sprout::array<T, N> const& arr,
|
||||
sprout::index_tuple<Indexes...>
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace sprout {
|
|||
public:
|
||||
sub_array_impl() = default;
|
||||
protected:
|
||||
template<typename ContainerTag, std::ptrdiff_t... Indexes>
|
||||
template<typename ContainerTag, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR sub_array_impl(
|
||||
ContainerTag,
|
||||
param_type arr,
|
||||
|
@ -141,7 +141,7 @@ namespace sprout {
|
|||
, first_(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::cbegin(arr), first))
|
||||
, last_(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::cbegin(arr), last))
|
||||
{}
|
||||
template<typename ContainerTag, std::ptrdiff_t... Indexes>
|
||||
template<typename ContainerTag, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR sub_array_impl(
|
||||
ContainerTag,
|
||||
param_type arr,
|
||||
|
@ -154,7 +154,7 @@ namespace sprout {
|
|||
, first_(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::cbegin(arr), first))
|
||||
, last_(NS_SSCRISK_CEL_OR_SPROUT_DETAIL::distance(sprout::cbegin(arr), last))
|
||||
{}
|
||||
template<typename ContainerTag, std::ptrdiff_t... Indexes>
|
||||
template<typename ContainerTag, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR sub_array_impl(
|
||||
ContainerTag,
|
||||
param_type arr,
|
||||
|
@ -167,7 +167,7 @@ namespace sprout {
|
|||
, first_(first)
|
||||
, last_(last)
|
||||
{}
|
||||
template<typename ContainerTag, std::ptrdiff_t... Indexes>
|
||||
template<typename ContainerTag, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR sub_array_impl(
|
||||
ContainerTag,
|
||||
param_type arr,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TUPLE_ALGORITHM_COPY_HPP
|
||||
#define SPROUT_TUPLE_ALGORITHM_COPY_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
|
@ -22,7 +21,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Tuple, typename InputTuple, std::ptrdiff_t... Indexes1, std::ptrdiff_t... Indexes2>
|
||||
template<typename Result, typename Tuple, typename InputTuple, sprout::index_t... Indexes1, sprout::index_t... Indexes2>
|
||||
SPROUT_CONSTEXPR inline Result copy_impl(
|
||||
Tuple const& t,
|
||||
InputTuple const& input,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP
|
||||
#define SPROUT_TUPLE_OPERATION_APPEND_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/tuple/tuple.hpp>
|
||||
|
@ -21,7 +20,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Tuple, typename InputTuple, std::ptrdiff_t... Indexes1, std::ptrdiff_t... Indexes2>
|
||||
template<typename Result, typename Tuple, typename InputTuple, sprout::index_t... Indexes1, sprout::index_t... Indexes2>
|
||||
SPROUT_CONSTEXPR inline Result append_back_impl(
|
||||
Tuple const& t,
|
||||
InputTuple const& input,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP
|
||||
#define SPROUT_TUPLE_OPERATION_APPEND_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/tuple/tuple.hpp>
|
||||
|
@ -21,7 +20,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Tuple, typename InputTuple, std::ptrdiff_t... Indexes1, std::ptrdiff_t... Indexes2>
|
||||
template<typename Result, typename Tuple, typename InputTuple, sprout::index_t... Indexes1, sprout::index_t... Indexes2>
|
||||
SPROUT_CONSTEXPR inline Result append_front_impl(
|
||||
Tuple const& t,
|
||||
InputTuple const& input,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP
|
||||
#define SPROUT_TUPLE_OPERATION_PUSH_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/tuple/tuple.hpp>
|
||||
|
@ -21,7 +20,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Tuple, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Tuple, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result push_back_impl(
|
||||
Tuple const& t,
|
||||
T const& v,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP
|
||||
#define SPROUT_TUPLE_OPERATION_PUSH_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/tuple/tuple.hpp>
|
||||
|
@ -21,7 +20,7 @@ namespace sprout {
|
|||
} // namespace result_of
|
||||
|
||||
namespace detail {
|
||||
template<typename Result, typename Tuple, typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename Result, typename Tuple, typename T, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline Result push_front_impl(
|
||||
Tuple const& t,
|
||||
T const& v,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TYPE_OPERATION_APPEND_BACK_HPP
|
||||
#define SPROUT_TYPE_OPERATION_APPEND_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/type/tuple.hpp>
|
||||
|
@ -17,7 +16,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple1, typename IndexTuple2>
|
||||
struct apply_impl;
|
||||
template<std::ptrdiff_t... Indexes1, std::ptrdiff_t... Indexes2>
|
||||
template<sprout::index_t... Indexes1, sprout::index_t... Indexes2>
|
||||
struct apply_impl<sprout::index_tuple<Indexes1...>, sprout::index_tuple<Indexes2...> >
|
||||
: public sprout::types::rebind_types<
|
||||
Tuple
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TYPE_OPERATION_APPEND_FRONT_HPP
|
||||
#define SPROUT_TYPE_OPERATION_APPEND_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/type/tuple.hpp>
|
||||
|
@ -17,7 +16,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple1, typename IndexTuple2>
|
||||
struct apply_impl;
|
||||
template<std::ptrdiff_t... Indexes1, std::ptrdiff_t... Indexes2>
|
||||
template<sprout::index_t... Indexes1, sprout::index_t... Indexes2>
|
||||
struct apply_impl<sprout::index_tuple<Indexes1...>, sprout::index_tuple<Indexes2...> >
|
||||
: public sprout::types::rebind_types<
|
||||
Tuple
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TYPE_OPERATION_PUSH_BACK_HPP
|
||||
#define SPROUT_TYPE_OPERATION_PUSH_BACK_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/type/tuple.hpp>
|
||||
|
@ -17,7 +16,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple>
|
||||
struct apply_impl;
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
struct apply_impl<sprout::index_tuple<Indexes...> >
|
||||
: public sprout::types::rebind_types<
|
||||
Tuple
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef SPROUT_TYPE_OPERATION_PUSH_FRONT_HPP
|
||||
#define SPROUT_TYPE_OPERATION_PUSH_FRONT_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/type/tuple.hpp>
|
||||
|
@ -17,7 +16,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple>
|
||||
struct apply_impl;
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
struct apply_impl<sprout::index_tuple<Indexes...> >
|
||||
: public sprout::types::rebind_types<
|
||||
Tuple
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef SPROUT_TYPE_STRING_TO_STRING_HPP
|
||||
#define SPROUT_TYPE_STRING_TO_STRING_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/type/string.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
|
@ -26,7 +26,7 @@ namespace sprout {
|
|||
private:
|
||||
template<typename IndexTuple>
|
||||
struct impl;
|
||||
template<std::ptrdiff_t... Indexes>
|
||||
template<sprout::index_t... Indexes>
|
||||
struct impl<sprout::index_tuple<Indexes...> > {
|
||||
public:
|
||||
typedef sprout::types::basic_string<
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef SPROUT_TYPE_STRING_TO_STRING_CONSTANT_HPP
|
||||
#define SPROUT_TYPE_STRING_TO_STRING_CONSTANT_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/index_tuple.hpp>
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/type/string.hpp>
|
||||
|
@ -37,7 +37,7 @@ namespace sprout {
|
|||
>::type
|
||||
>
|
||||
{};
|
||||
template<typename Sequence, std::ptrdiff_t... Indexes>
|
||||
template<typename Sequence, sprout::index_t... Indexes>
|
||||
SPROUT_CONSTEXPR inline sprout::basic_string<
|
||||
typename Sequence::value_type,
|
||||
sprout::types::detail::str_length<Sequence>::value
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
typedef sprout::tuples::tuple<Types...> tuple_type;;
|
||||
typedef sprout::types::type_tuple<typename std::decay<Types>::type...> uncvref_tuple_type;;
|
||||
private:
|
||||
template<typename T, std::ptrdiff_t... Indexes>
|
||||
template<typename T, sprout::index_t... Indexes>
|
||||
static SPROUT_CONSTEXPR tuple_type init(T&& operand, sprout::index_tuple<Indexes...>) {
|
||||
return sprout::tuples::make_clone<tuple_type>(
|
||||
typename sprout::tuples::tuple_element<Indexes, tuple_type>::type()...,
|
||||
|
|
Loading…
Reference in a new issue