decltype not typeof

It's been too long since I wrote C++...
This commit is contained in:
Eric Wieser 2022-07-11 17:02:00 +01:00 committed by GitHub
parent d585b6e86e
commit 17f5b3f4c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1250,7 +1250,7 @@ scan_number_done:
if (errno == 0) if (errno == 0)
{ {
value_unsigned = static_cast<number_unsigned_t>(x); value_unsigned = static_cast<number_unsigned_t>(x);
if (static_cast<typeof(x)>(value_unsigned) == x) if (static_cast<decltype(x)>(value_unsigned) == x)
{ {
return token_type::value_unsigned; return token_type::value_unsigned;
} }
@ -1266,7 +1266,7 @@ scan_number_done:
if (errno == 0) if (errno == 0)
{ {
value_integer = static_cast<number_integer_t>(x); value_integer = static_cast<number_integer_t>(x);
if (static_cast<typeof(x)>(value_integer) == x) if (static_cast<decltype(x)>(value_integer) == x)
{ {
return token_type::value_integer; return token_type::value_integer;
} }