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.
This commit is contained in:
Bart
2025-04-01 11:21:59 -04:00
committed by GitHub
parent 72e076b694
commit f608e653ca

View File

@@ -31,12 +31,13 @@
#include <type_traits>
#include <utility>
#ifdef BOOST_COMP_MSVC
#ifdef _MSC_VER
#pragma message("Using boost::multiprecision::uint128_t")
#include <boost/multiprecision/cpp_int.hpp>
using uint128_t = boost::multiprecision::uint128_t;
#else // !defined(_MSVC_LANG)
#else // !defined(_MSC_VER)
using uint128_t = __uint128_t;
#endif // !defined(_MSVC_LANG)
#endif // !defined(_MSC_VER)
namespace ripple {