fix index_range

This commit is contained in:
bolero-MURAKAMI 2013-04-05 18:11:56 +09:00
parent 44f973cc19
commit 312aa7f73c
3 changed files with 6 additions and 10 deletions

View file

@ -49,7 +49,7 @@ namespace sprout {
> >
: public sprout::detail::integer_range_next_even< : public sprout::detail::integer_range_next_even<
T, typename sprout::detail::integer_range_impl<T, First, Step, N / 2>::type, T, typename sprout::detail::integer_range_impl<T, First, Step, N / 2>::type,
First + N / 2 * Step N / 2 * Step
> >
{}; {};
template<typename T, T First, std::ptrdiff_t Step, std::size_t N> template<typename T, T First, std::ptrdiff_t Step, std::size_t N>
@ -59,7 +59,7 @@ namespace sprout {
> >
: public sprout::detail::integer_range_next_odd< : public sprout::detail::integer_range_next_odd<
T, typename sprout::detail::integer_range_impl<T, First, Step, N / 2>::type, T, typename sprout::detail::integer_range_impl<T, First, Step, N / 2>::type,
First + N / 2 * Step, First + (N - 1) * Step N / 2 * Step, First + (N - 1) * Step
> >
{}; {};
} // namespace detail } // namespace detail

View file

@ -18,10 +18,8 @@ namespace sprout {
template <typename T1, typename T2> template <typename T1, typename T2>
template <typename... Args1, typename... Args2, sprout::index_t... Indexes1, sprout::index_t... Indexes2> template <typename... Args1, typename... Args2, sprout::index_t... Indexes1, sprout::index_t... Indexes2>
inline SPROUT_CONSTEXPR sprout::pair<T1, T2>::pair( inline SPROUT_CONSTEXPR sprout::pair<T1, T2>::pair(
sprout::tuples::tuple<Args1...> first_args, sprout::tuples::tuple<Args1...> first_args, sprout::tuples::tuple<Args2...> second_args,
sprout::tuples::tuple<Args2...> second_args, sprout::index_tuple<Indexes1...>, sprout::index_tuple<Indexes2...>
sprout::index_tuple<Indexes1...>,
sprout::index_tuple<Indexes2...>
) )
: first(sprout::tuples::get<Indexes1>(first_args)...) : first(sprout::tuples::get<Indexes1>(first_args)...)
, second(sprout::tuples::get<Indexes2>(second_args)...) , second(sprout::tuples::get<Indexes2>(second_args)...)

View file

@ -25,10 +25,8 @@ namespace sprout {
private: private:
template <typename... Args1, typename... Args2, sprout::index_t... Indexes1, sprout::index_t... Indexes2> template <typename... Args1, typename... Args2, sprout::index_t... Indexes1, sprout::index_t... Indexes2>
SPROUT_CONSTEXPR pair( SPROUT_CONSTEXPR pair(
sprout::tuples::tuple<Args1...> first_args, sprout::tuples::tuple<Args1...> first_args, sprout::tuples::tuple<Args2...> second_args,
sprout::tuples::tuple<Args2...> second_args, sprout::index_tuple<Indexes1...>, sprout::index_tuple<Indexes2...>
sprout::index_tuple<Indexes1...>,
sprout::index_tuple<Indexes2...>
); );
public: public:
SPROUT_CONSTEXPR pair() SPROUT_CONSTEXPR pair()