1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

sprout::index_t 追加

This commit is contained in:
bolero-MURAKAMI 2012-02-28 10:46:39 +09:00
parent c9471df964
commit d5dcbaf4b2
44 changed files with 80 additions and 101 deletions

View file

@ -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<

View file

@ -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>()...);
}

View file

@ -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,