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

fix char literal implementation

This commit is contained in:
bolero-MURAKAMI 2014-10-27 10:16:49 +09:00
parent 773855410b
commit 897d1e25b6
18 changed files with 325 additions and 95 deletions

View file

@ -14,6 +14,7 @@
#include <sprout/iterator/operation.hpp>
#include <sprout/iterator/type_traits/category.hpp>
#include <sprout/utility/pair/pair.hpp>
#include <sprout/detail/char_literal.hpp>
namespace sprout {
namespace weed {
@ -27,7 +28,7 @@ namespace sprout {
{
return found != first ? found
: pivot == 0 ? (
*first == T('-') ? *sprout::prev(first) <= value && *sprout::next(first) >= value
*first == SPROUT_CHAR_LITERAL('-', T) ? *sprout::prev(first) <= value && *sprout::next(first) >= value
: *first == value
) ? first : last
: sprout::weed::detail::find_character_set_impl_ra(
@ -66,7 +67,7 @@ namespace sprout {
typedef sprout::pair<BidirectionalIterator, bool> type;
return current.second || current.first == last ? current
: n == 1 ? (
*current.first == T('-') ? *sprout::prev(current.first) <= value && *sprout::next(current.first) >= value
*current.first == SPROUT_CHAR_LITERAL('-', T) ? *sprout::prev(current.first) <= value && *sprout::next(current.first) >= value
: *current.first == value
) ? type(current.first, true) : type(sprout::next(current.first), false)
: sprout::weed::detail::find_character_set_impl_1(