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

add bool_constant [N4334]

This commit is contained in:
bolero-MURAKAMI 2014-12-10 19:54:12 +09:00
parent fbb95d9068
commit a1f6d6ffc3
35 changed files with 198 additions and 106 deletions

View file

@ -16,8 +16,7 @@ namespace sprout {
namespace detail {
template<typename CharType>
struct is_char_type_of_consecutive_digits
: public sprout::integral_constant<
bool,
: public sprout::bool_constant<
SPROUT_CHAR_LITERAL('0', CharType) + 1 == SPROUT_CHAR_LITERAL('1', CharType)
&& SPROUT_CHAR_LITERAL('1', CharType) + 1 == SPROUT_CHAR_LITERAL('2', CharType)
&& SPROUT_CHAR_LITERAL('2', CharType) + 1 == SPROUT_CHAR_LITERAL('3', CharType)
@ -44,8 +43,7 @@ namespace sprout {
template<typename CharType>
struct is_char_type_of_consecutive_lower_alphabet
: public sprout::integral_constant<
bool,
: public sprout::bool_constant<
SPROUT_CHAR_LITERAL('a', CharType) + 1 == SPROUT_CHAR_LITERAL('b', CharType)
&& SPROUT_CHAR_LITERAL('b', CharType) + 1 == SPROUT_CHAR_LITERAL('c', CharType)
&& SPROUT_CHAR_LITERAL('c', CharType) + 1 == SPROUT_CHAR_LITERAL('d', CharType)
@ -88,8 +86,7 @@ namespace sprout {
template<typename CharType>
struct is_char_type_of_consecutive_upper_alphabet
: public sprout::integral_constant<
bool,
: public sprout::bool_constant<
SPROUT_CHAR_LITERAL('A', CharType) + 1 == SPROUT_CHAR_LITERAL('B', CharType)
&& SPROUT_CHAR_LITERAL('B', CharType) + 1 == SPROUT_CHAR_LITERAL('C', CharType)
&& SPROUT_CHAR_LITERAL('C', CharType) + 1 == SPROUT_CHAR_LITERAL('D', CharType)