Skip to content

Commit

Permalink
Work around msvc-14.[012] failures
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed May 16, 2024
1 parent f242dee commit 3c267e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/boost/uuid/uuid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <boost/uuid/detail/config.hpp>
#include <boost/type_traits/integral_constant.hpp> // for Serialization support
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <array>
#include <chrono>
#include <typeindex> // cheapest std::hash
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 3c267e6

Please sign in to comment.