From 3c267e61997204447ea802b4bdf719c64900ae85 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 16 May 2024 18:58:38 +0300 Subject: [PATCH] Work around msvc-14.[012] failures --- include/boost/uuid/uuid.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/uuid/uuid.hpp b/include/boost/uuid/uuid.hpp index 6e79e326..3e94ba09 100644 --- a/include/boost/uuid/uuid.hpp +++ b/include/boost/uuid/uuid.hpp @@ -12,6 +12,7 @@ #include #include // for Serialization support #include +#include #include #include #include // cheapest std::hash @@ -53,6 +54,16 @@ struct uuid std::uint8_t* operator()() noexcept { return repr_; } std::uint8_t const* operator()() const noexcept { return repr_; } + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1930) + + std::uint8_t* operator+( std::ptrdiff_t i ) noexcept { return repr_ + i; } + std::uint8_t const* operator+( std::ptrdiff_t i ) const noexcept { return repr_ + i; } + + std::uint8_t& operator[]( std::ptrdiff_t i ) noexcept { return repr_[ i ]; } + std::uint8_t const& operator[]( std::ptrdiff_t i ) const noexcept { return repr_[ i ]; } + +#endif }; public: