mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
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:
@@ -31,12 +31,13 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#ifdef BOOST_COMP_MSVC
|
#ifdef _MSC_VER
|
||||||
|
#pragma message("Using boost::multiprecision::uint128_t")
|
||||||
#include <boost/multiprecision/cpp_int.hpp>
|
#include <boost/multiprecision/cpp_int.hpp>
|
||||||
using uint128_t = boost::multiprecision::uint128_t;
|
using uint128_t = boost::multiprecision::uint128_t;
|
||||||
#else // !defined(_MSVC_LANG)
|
#else // !defined(_MSC_VER)
|
||||||
using uint128_t = __uint128_t;
|
using uint128_t = __uint128_t;
|
||||||
#endif // !defined(_MSVC_LANG)
|
#endif // !defined(_MSC_VER)
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user