Skip to content

Commit f608e65

Browse files
authored
Fix undefined uint128_t type on Windows non-unity builds (#5377)
As part of import optimization, a transitive include had been removed that defined `BOOST_COMP_MSVC` on Windows. In unity builds, this definition was pulled in, but in non-unity builds it was not - causing a compilation error. An inspection of the Boost code revealed that we can just gate the statements by `_MS_VER` instead. A `#pragma message` is added to verify that the statement is only printed on Windows builds.
1 parent 72e076b commit f608e65

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libxrpl/basics/Number.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@
3131
#include <type_traits>
3232
#include <utility>
3333

34-
#ifdef BOOST_COMP_MSVC
34+
#ifdef _MSC_VER
35+
#pragma message("Using boost::multiprecision::uint128_t")
3536
#include <boost/multiprecision/cpp_int.hpp>
3637
using uint128_t = boost::multiprecision::uint128_t;
37-
#else // !defined(_MSVC_LANG)
38+
#else // !defined(_MSC_VER)
3839
using uint128_t = __uint128_t;
39-
#endif // !defined(_MSVC_LANG)
40+
#endif // !defined(_MSC_VER)
4041

4142
namespace ripple {
4243

0 commit comments

Comments
 (0)