Skip to content

Commit 8885521

Browse files
authored
Fix MSVC build in preprocessor conformance mode (#327)
We need to split `""` and `_u` tokens in the `DEFINE_ALIAS_AND_LITERAL` macro to make it conformant with the C11 preprocessor.
1 parent 72ae825 commit 8885521

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/intx/intx.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,14 +1581,14 @@ inline constexpr uint256 mulmod(const uint256& x, const uint256& y, const uint25
15811581

15821582
/// Define type alias uintN = uint<N> and the matching literal ""_uN.
15831583
/// The literal operators are defined in the intx::literals namespace.
1584-
#define DEFINE_ALIAS_AND_LITERAL(N) \
1585-
using uint##N = uint<N>; \
1586-
namespace literals \
1587-
{ \
1588-
consteval uint##N operator""_u##N(const char* s) \
1589-
{ \
1590-
return from_string<uint##N>(s); \
1591-
} \
1584+
#define DEFINE_ALIAS_AND_LITERAL(N) \
1585+
using uint##N = uint<N>; \
1586+
namespace literals \
1587+
{ \
1588+
consteval uint##N operator"" _u##N(const char* s) \
1589+
{ \
1590+
return from_string<uint##N>(s); \
1591+
} \
15921592
}
15931593
DEFINE_ALIAS_AND_LITERAL(128);
15941594
DEFINE_ALIAS_AND_LITERAL(192);

0 commit comments

Comments
 (0)