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:
parent
773855410b
commit
897d1e25b6
18 changed files with 325 additions and 95 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue