mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix iterator parameter
This commit is contained in:
parent
6e8b5ea395
commit
802f2fbaed
111 changed files with 607 additions and 633 deletions
|
@ -66,8 +66,7 @@ namespace sprout {
|
|||
N == limit_digits,
|
||||
typename result<Context, Iterator>::type
|
||||
>::type call_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
IntType t,
|
||||
std::size_t n,
|
||||
|
@ -79,8 +78,7 @@ namespace sprout {
|
|||
return sprout::tuples::get<1>(res)
|
||||
? n < MaxDigits
|
||||
? call_0<N - 1, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
static_cast<IntType>(t * Radix + sprout::tuples::get<0>(res)),
|
||||
n
|
||||
|
@ -100,8 +98,7 @@ namespace sprout {
|
|||
N != limit_digits,
|
||||
typename result<Context, Iterator>::type
|
||||
>::type call_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
IntType t,
|
||||
std::size_t n,
|
||||
|
@ -112,8 +109,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return sprout::tuples::get<1>(res)
|
||||
? call_0<N, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
static_cast<IntType>(t * Radix + sprout::tuples::get<0>(res)),
|
||||
n
|
||||
|
@ -125,8 +121,7 @@ namespace sprout {
|
|||
}
|
||||
template<std::size_t N, typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call_0(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
IntType t,
|
||||
std::size_t n
|
||||
|
@ -136,8 +131,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return first != last
|
||||
? call_1<N + 1, Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
temp_first,
|
||||
t,
|
||||
n + 1,
|
||||
|
@ -150,8 +144,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Context, typename Iterator, typename PResult>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call_i(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
PResult const& res
|
||||
) const
|
||||
|
@ -160,8 +153,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return sprout::tuples::get<1>(res)
|
||||
? call_0<1, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
sprout::tuples::get<0>(res),
|
||||
1
|
||||
|
@ -171,8 +163,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
int sign = 0
|
||||
) const
|
||||
|
@ -182,8 +173,7 @@ namespace sprout {
|
|||
return first != last
|
||||
? make_result<Context, Iterator>(
|
||||
call_i<Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
temp_first,
|
||||
sprout::weed::detail::from_ndigit<Radix, IntType>(*first)
|
||||
),
|
||||
|
@ -195,8 +185,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type operator()(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Context const&
|
||||
) const
|
||||
{
|
||||
|
@ -206,21 +195,18 @@ namespace sprout {
|
|||
return first != last
|
||||
? *first == SPROUT_CHAR_LITERAL('+', elem_type)
|
||||
? call<Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
first,
|
||||
1
|
||||
)
|
||||
: *first == SPROUT_CHAR_LITERAL('-', elem_type)
|
||||
? call<Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
first,
|
||||
-1
|
||||
)
|
||||
: call<Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
first
|
||||
)
|
||||
: result_type(false, first, attribute_type())
|
||||
|
|
|
@ -65,8 +65,7 @@ namespace sprout {
|
|||
N == limit_digits,
|
||||
typename result<Context, Iterator>::type
|
||||
>::type call_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
UIntType t,
|
||||
std::size_t n,
|
||||
|
@ -78,8 +77,7 @@ namespace sprout {
|
|||
return sprout::tuples::get<1>(res)
|
||||
? n < MaxDigits
|
||||
? call_0<N - 1, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
static_cast<UIntType>(t * Radix + sprout::tuples::get<0>(res)),
|
||||
n
|
||||
|
@ -99,8 +97,7 @@ namespace sprout {
|
|||
N != limit_digits,
|
||||
typename result<Context, Iterator>::type
|
||||
>::type call_1(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
UIntType t,
|
||||
std::size_t n,
|
||||
|
@ -111,8 +108,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return sprout::tuples::get<1>(res)
|
||||
? call_0<N, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
static_cast<UIntType>(t * Radix + sprout::tuples::get<0>(res)),
|
||||
n
|
||||
|
@ -124,8 +120,7 @@ namespace sprout {
|
|||
}
|
||||
template<std::size_t N, typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call_0(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
UIntType t,
|
||||
std::size_t n
|
||||
|
@ -135,8 +130,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return first != last
|
||||
? call_1<N + 1, Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
temp_first,
|
||||
t,
|
||||
n + 1,
|
||||
|
@ -149,8 +143,7 @@ namespace sprout {
|
|||
}
|
||||
template<typename Context, typename Iterator, typename PResult>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call_i(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first,
|
||||
PResult const& res
|
||||
) const
|
||||
|
@ -159,8 +152,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return sprout::tuples::get<1>(res)
|
||||
? call_0<1, Context>(
|
||||
sprout::next(first),
|
||||
last,
|
||||
sprout::next(first), last,
|
||||
temp_first,
|
||||
sprout::tuples::get<0>(res),
|
||||
1
|
||||
|
@ -170,14 +162,12 @@ namespace sprout {
|
|||
}
|
||||
template<typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type call(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Iterator temp_first
|
||||
) const
|
||||
{
|
||||
return call_i<Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
temp_first,
|
||||
sprout::weed::detail::from_ndigit<Radix, UIntType>(*first)
|
||||
);
|
||||
|
@ -185,8 +175,7 @@ namespace sprout {
|
|||
public:
|
||||
template<typename Context, typename Iterator>
|
||||
SPROUT_CONSTEXPR typename result<Context, Iterator>::type operator()(
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
Iterator first, Iterator last,
|
||||
Context const&
|
||||
) const
|
||||
{
|
||||
|
@ -194,8 +183,7 @@ namespace sprout {
|
|||
typedef typename attribute<Context, Iterator>::type attribute_type;
|
||||
return first != last
|
||||
? call<Context>(
|
||||
first,
|
||||
last,
|
||||
first, last,
|
||||
first
|
||||
)
|
||||
: result_type(false, first, attribute_type())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue