Skip to content

Commit 6225211

Browse files
committed
fix for overly sensitive gcc
1 parent 6b344bf commit 6225211

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/generating.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ static_assert(same_f(CTRE_GEN("(?:abc)"), ctre::string<'a','b','c'>()));
5353
static_assert(same_f(CTRE_GEN("\\x40"), ctre::character<char{0x40}>()));
5454
static_assert(same_f(CTRE_GEN("\\x7F"), ctre::character<char{0x7F}>()));
5555
// only characters with value < 128 are char otherwise they are internally char32_t
56-
constexpr bool char_is_unsigned = (std::numeric_limits<char>::max)() == 255;
56+
constexpr unsigned char_length = (std::numeric_limits<char>::max)();
57+
constexpr bool char_is_unsigned = (char_length == 255);
5758
// I wish I could have operator implication here :(
5859
using expected_type = std::conditional_t<char_is_unsigned, char, char32_t>;
5960
static_assert(same_f(CTRE_GEN("\\x80"), ctre::character<expected_type{0x80}>()));

0 commit comments

Comments
 (0)