39 constexpr
UUID() noexcept : data_({}) {}
43 std::copy(std::cbegin(arr), std::cend(arr), std::begin(data_));
47 explicit UUID(
char (&arr)[16]) noexcept {
49 std::cbegin(arr), std::cend(arr), std::begin(data_), [](
char c) ->
value_type {
54 void swap(
UUID& other) noexcept { data_.swap(other.data_); }
57 constexpr
value_type* data() noexcept {
return data_.data(); }
58 constexpr
const value_type* data() const noexcept {
return data_.data(); }
61 friend std::ostream&
operator<< (std::ostream& s,
const UUID&
id) {
64 s << std::hex << std::setfill(
'0')
65 << std::setw(2) << +
id.data_[0]
66 << std::setw(2) << +
id.data_[1]
67 << std::setw(2) << +
id.data_[2]
68 << std::setw(2) << +
id.data_[3]
70 << std::setw(2) << +
id.data_[4]
71 << std::setw(2) << +
id.data_[5]
73 << std::setw(2) << +
id.data_[6]
74 << std::setw(2) << +
id.data_[7]
76 << std::setw(2) << +
id.data_[8]
77 << std::setw(2) << +
id.data_[9]
79 << std::setw(2) << +
id.data_[10]
80 << std::setw(2) << +
id.data_[11]
81 << std::setw(2) << +
id.data_[12]
82 << std::setw(2) << +
id.data_[13]
83 << std::setw(2) << +
id.data_[14]
84 << std::setw(2) << +
id.data_[15]
85 << std::setfill(
fill);
92 std::array<value_type, 16> data_;
99 return lhs.data_ == rhs.data_;
103 return !(lhs == rhs);
107 return lhs.data_ < rhs.data_;
111 std::stringstream ss;
bool operator<(const UUID &lhs, const UUID &rhs) noexcept
std::ostream & operator<<(std::ostream &os, const SessionInfo &session_info)
std::string to_string(const UUID &uuid)
DEVICE void fill(ARGS &&...args)
constexpr UUID empty_uuid
DEVICE auto copy(ARGS &&...args)
OUTPUT transform(INPUT const &input, FUNC const &func)
constexpr UUID() noexcept
bool operator==(const JSON &json1, const JSON &json2)
bool operator!=(const JSON &json1, const JSON &json2)
friend bool operator==(const UUID &lhs, const UUID &rhs) noexcept
DEVICE void swap(ARGS &&...args)
friend bool operator<(const UUID &lhs, const UUID &rhs) noexcept