7#include <openxr/openxr.h>
9inline bool operator==(
const XrUuidMSFT& lh,
const XrUuidMSFT& rh)
noexcept {
10 return memcmp(&rh, &lh,
sizeof(XrUuidMSFT)) == 0;
13inline bool operator!=(
const XrUuidMSFT& lh,
const XrUuidMSFT& rh)
noexcept {
17inline bool operator<(
const XrUuidMSFT& lh,
const XrUuidMSFT& rh)
noexcept {
18 return memcmp(&lh, &rh,
sizeof(XrUuidMSFT)) < 0;
36 template <
typename Type>
48 explicit operator XrUuidMSFT() const noexcept {
53 return m_uuid == other.m_uuid;
57 return m_uuid != other.m_uuid;
61 return m_uuid < other.m_uuid;
73 struct hash<XrUuidMSFT> {
74 std::size_t
operator()(
const XrUuidMSFT& uuid)
const noexcept {
75 static_assert(
sizeof(XrUuidMSFT) ==
sizeof(uint64_t) * 2);
76 const uint64_t* v =
reinterpret_cast<const uint64_t*
>(uuid.bytes);
77 return std::hash<uint64_t>{}(v[0]) ^ (std::hash<uint64_t>{}(v[1]) << 1);
83 struct hash<
xr::TypedUuid<T>> {
85 return std::hash<XrUuidMSFT>{}(
static_cast<XrUuidMSFT
>(uuid));
bool operator<(const XrUuidMSFT &lh, const XrUuidMSFT &rh) noexcept
bool operator!=(const XrUuidMSFT &lh, const XrUuidMSFT &rh) noexcept
bool operator==(const XrUuidMSFT &lh, const XrUuidMSFT &rh) noexcept
The xr::DispatchTable struct contains all available PFN pointers to xr functions including those in a...
std::size_t operator()(const XrUuidMSFT &uuid) const noexcept
std::size_t operator()(const xr::TypedUuid< T > &uuid) const noexcept
bool operator<(const TypedUuid &other) const noexcept
bool operator!=(const TypedUuid &other) const noexcept
TypedUuid() noexcept=default
bool operator==(const TypedUuid &other) const noexcept
TypedUuid & operator=(const XrUuidMSFT &uuid) noexcept