Warning, file /include/boost/uuid/detail/uuid_uint128.ipp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef BOOST_UUID_DETAIL_UUID_UINT128_IPP_INCLUDED
0002 #define BOOST_UUID_DETAIL_UUID_UINT128_IPP_INCLUDED
0003
0004
0005
0006
0007
0008 #include <boost/uuid/detail/endian.hpp>
0009
0010 #if defined(BOOST_UUID_REPORT_IMPLEMENTATION)
0011
0012 #include <boost/config/pragma_message.hpp>
0013 BOOST_PRAGMA_MESSAGE( "Using uuid_uint128.ipp" )
0014
0015 #endif
0016
0017 namespace boost {
0018 namespace uuids {
0019
0020 inline bool uuid::is_nil() const noexcept
0021 {
0022 __uint128_t v = detail::load_native_u128( this->data );
0023 return v == 0;
0024 }
0025
0026 inline void uuid::swap( uuid& rhs ) noexcept
0027 {
0028 __uint128_t v1 = detail::load_native_u128( this->data );
0029 __uint128_t v2 = detail::load_native_u128( rhs.data );
0030
0031 detail::store_native_u128( this->data, v2 );
0032 detail::store_native_u128( rhs.data, v1 );
0033 }
0034
0035 inline bool operator==( uuid const& lhs, uuid const& rhs ) noexcept
0036 {
0037 __uint128_t v1 = detail::load_native_u128( lhs.data );
0038 __uint128_t v2 = detail::load_native_u128( rhs.data );
0039
0040 return v1 == v2;
0041 }
0042
0043 inline bool operator<( uuid const& lhs, uuid const& rhs ) noexcept
0044 {
0045 __uint128_t v1 = detail::load_big_u128( lhs.data );
0046 __uint128_t v2 = detail::load_big_u128( rhs.data );
0047
0048 return v1 < v2;
0049 }
0050
0051 #if defined(BOOST_UUID_HAS_THREE_WAY_COMPARISON)
0052
0053 inline std::strong_ordering operator<=> (uuid const& lhs, uuid const& rhs) noexcept
0054 {
0055 __uint128_t v1 = detail::load_big_u128( lhs.data );
0056 __uint128_t v2 = detail::load_big_u128( rhs.data );
0057
0058 return v1 <=> v2;
0059 }
0060
0061 #endif
0062
0063 }
0064 }
0065
0066 #endif