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

@ -13,6 +13,7 @@
#include <sprout/ctype/ascii.hpp>
#include <sprout/algorithm/equal.hpp>
#include <sprout/iterator/ptr_index_iterator.hpp>
#include <sprout/detail/char_conversion.hpp>
namespace sprout {
namespace detail {
@ -44,9 +45,9 @@ namespace sprout {
namespace detail {
template<typename Elem>
inline SPROUT_CONSTEXPR int
get_num(Elem e) {
return !sprout::isdigit(e) ? 0
: e - static_cast<Elem>('0')
get_num(Elem c) {
return !sprout::isdigit(c) ? 0
: sprout::detail::char_to_int(c)
;
}
template<typename InputIterator>