mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
rewrite sprout::algorithm::join performance
This commit is contained in:
parent
0ceabb5b9b
commit
1ea9d30e2a
145 changed files with 1359 additions and 364 deletions
|
@ -17,7 +17,7 @@ namespace sprout {
|
|||
private:
|
||||
SPROUT_CONSTEXPR not_a_valid_type() {}
|
||||
};
|
||||
|
||||
|
||||
template<typename Tag, typename Arg>
|
||||
struct address_of_hack {
|
||||
public:
|
||||
|
@ -317,12 +317,12 @@ namespace sprout {
|
|||
template<typename... As>
|
||||
SPROUT_CONSTEXPR typename sprout::breed::result_of::funop<
|
||||
expr(As const&...),
|
||||
expr,
|
||||
expr,
|
||||
sprout::breed::default_domain
|
||||
>::type operator()(As const&... args) const {
|
||||
return sprout::breed::result_of::funop<
|
||||
expr(As const&...),
|
||||
expr,
|
||||
expr,
|
||||
sprout::breed::default_domain
|
||||
>::call(*this, args...);
|
||||
}
|
||||
|
@ -444,12 +444,12 @@ namespace sprout {
|
|||
template<typename... As>
|
||||
SPROUT_CONSTEXPR typename sprout::breed::result_of::funop<
|
||||
expr(As const&...),
|
||||
expr,
|
||||
expr,
|
||||
sprout::breed::default_domain
|
||||
>::type operator()(As const&... args) const {
|
||||
return sprout::breed::result_of::funop<
|
||||
expr(As const&...),
|
||||
expr,
|
||||
expr,
|
||||
sprout::breed::default_domain
|
||||
>::call(*this, args...);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace sprout {
|
|||
struct basic_default_generator
|
||||
: public sprout::breed::use_basic_expr<sprout::breed::default_generator>
|
||||
{};
|
||||
|
||||
|
||||
//
|
||||
// generator
|
||||
//
|
||||
|
@ -146,7 +146,7 @@ namespace sprout {
|
|||
template<typename This, typename Expr>
|
||||
struct result<This(Expr const&)>
|
||||
{
|
||||
public:
|
||||
public:
|
||||
typedef Extends<Expr> type;
|
||||
};
|
||||
public:
|
||||
|
|
|
@ -8,52 +8,52 @@ namespace sprout {
|
|||
namespace breed {
|
||||
namespace tagns_ {
|
||||
namespace tag {
|
||||
struct terminal {};
|
||||
struct unary_plus {};
|
||||
struct negate {};
|
||||
struct dereference {};
|
||||
struct complement {};
|
||||
struct address_of {};
|
||||
struct logical_not {};
|
||||
struct pre_inc {};
|
||||
struct pre_dec {};
|
||||
struct post_inc {};
|
||||
struct post_dec {};
|
||||
struct shift_left {};
|
||||
struct shift_right {};
|
||||
struct multiplies {};
|
||||
struct divides {};
|
||||
struct modulus {};
|
||||
struct plus {};
|
||||
struct minus {};
|
||||
struct less {};
|
||||
struct greater {};
|
||||
struct less_equal {};
|
||||
struct greater_equal {};
|
||||
struct equal_to {};
|
||||
struct not_equal_to {};
|
||||
struct logical_or {};
|
||||
struct logical_and {};
|
||||
struct bitwise_and {};
|
||||
struct bitwise_or {};
|
||||
struct bitwise_xor {};
|
||||
struct comma {};
|
||||
struct mem_ptr {};
|
||||
struct assign {};
|
||||
struct shift_left_assign {};
|
||||
struct shift_right_assign {};
|
||||
struct multiplies_assign {};
|
||||
struct divides_assign {};
|
||||
struct modulus_assign {};
|
||||
struct plus_assign {};
|
||||
struct minus_assign {};
|
||||
struct bitwise_and_assign {};
|
||||
struct bitwise_or_assign {};
|
||||
struct bitwise_xor_assign {};
|
||||
struct subscript {};
|
||||
struct member {};
|
||||
struct if_else_ {};
|
||||
struct function {};
|
||||
struct terminal {};
|
||||
struct unary_plus {};
|
||||
struct negate {};
|
||||
struct dereference {};
|
||||
struct complement {};
|
||||
struct address_of {};
|
||||
struct logical_not {};
|
||||
struct pre_inc {};
|
||||
struct pre_dec {};
|
||||
struct post_inc {};
|
||||
struct post_dec {};
|
||||
struct shift_left {};
|
||||
struct shift_right {};
|
||||
struct multiplies {};
|
||||
struct divides {};
|
||||
struct modulus {};
|
||||
struct plus {};
|
||||
struct minus {};
|
||||
struct less {};
|
||||
struct greater {};
|
||||
struct less_equal {};
|
||||
struct greater_equal {};
|
||||
struct equal_to {};
|
||||
struct not_equal_to {};
|
||||
struct logical_or {};
|
||||
struct logical_and {};
|
||||
struct bitwise_and {};
|
||||
struct bitwise_or {};
|
||||
struct bitwise_xor {};
|
||||
struct comma {};
|
||||
struct mem_ptr {};
|
||||
struct assign {};
|
||||
struct shift_left_assign {};
|
||||
struct shift_right_assign {};
|
||||
struct multiplies_assign {};
|
||||
struct divides_assign {};
|
||||
struct modulus_assign {};
|
||||
struct plus_assign {};
|
||||
struct minus_assign {};
|
||||
struct bitwise_and_assign {};
|
||||
struct bitwise_or_assign {};
|
||||
struct bitwise_xor_assign {};
|
||||
struct subscript {};
|
||||
struct member {};
|
||||
struct if_else_ {};
|
||||
struct function {};
|
||||
} // namespace tag
|
||||
} // namespace tagns_
|
||||
} // namespace breed
|
||||
|
|
|
@ -481,7 +481,7 @@ namespace sprout {
|
|||
N < sizeof...(Args),
|
||||
sprout::tppack_at<N, Args...>,
|
||||
sprout::breed::detail::if_vararg<typename sprout::tppack_at<sizeof...(Args) - 1, Args...>::type>
|
||||
>::type::type
|
||||
>::type::type
|
||||
};
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl
|
||||
|
@ -519,7 +519,7 @@ namespace sprout {
|
|||
N < sizeof...(Args),
|
||||
sprout::tppack_at<N, Args...>,
|
||||
sprout::breed::detail::if_vararg<typename sprout::tppack_at<sizeof...(Args) - 1, Args...>::type>
|
||||
>::type::type
|
||||
>::type::type
|
||||
};
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace sprout {
|
||||
namespace breed {
|
||||
namespace detail {
|
||||
namespace detail {
|
||||
template<
|
||||
typename Grammar,
|
||||
typename Expr,
|
||||
|
@ -32,10 +32,10 @@ namespace sprout {
|
|||
public:
|
||||
typedef sprout::breed::list<
|
||||
typename Grammar::template breed_child<Indexes>::type::template impl<
|
||||
typename sprout::breed::result_of::child_c<Expr, Indexes>::type,
|
||||
State,
|
||||
Data
|
||||
>::result_type...
|
||||
typename sprout::breed::result_of::child_c<Expr, Indexes>::type,
|
||||
State,
|
||||
Data
|
||||
>::result_type...
|
||||
> type;
|
||||
};
|
||||
public:
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace sprout {
|
|||
struct otherwise
|
||||
: public sprout::breed::when<sprout::breed::_, Fun>
|
||||
{};
|
||||
//
|
||||
//
|
||||
// external_transforms
|
||||
//
|
||||
template<typename... Args>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue