4 #error "This file must be compiled as C++." 7 #include <arbiter/Value.h> 27 template<
typename Owner>
35 , _equalTo(value.equalTo)
36 , _lessThan(value.lessThan)
47 assert(_equalTo == other._equalTo);
48 return _equalTo(
data(), other.data());
53 return !(*
this == other);
58 assert(_lessThan == other._lessThan);
59 return _lessThan(
data(), other.data());
69 return !(*
this < other);
74 return !(*
this > other);
92 return "Arbiter::SharedUserValue";
103 bool (*_equalTo)(
const void *first,
const void *second);
104 bool (*_lessThan)(
const void *first,
const void *second);
105 size_t (*_hash)(
const void *data);
106 char *(*_createDescription)(
const void *data);
108 static void noOpDestructor (
void *)
122 template<
typename Owner>
134 template<
typename Owner>
137 return os << value.description();
char *(* createDescription)(const void *data)
An operation to convert this data object to a string.
size_t operator()(const Arbiter::SharedUserValue< Owner > &value) const
auto makeIteratorRange(const Collection &collection)
Creates an IteratorRange encompassing the entirety of the given read-only collection.
bool operator!=(const SharedUserValue &other) const
std::shared_ptr< void > shareUserContext(ArbiterUserContext context)
Converts an ArbiterUserContext into a shared pointer, automatically invoking its destructor when the ...
SharedUserValue()=default
bool operator>=(const SharedUserValue &other) const
bool operator==(const SharedUserValue &other) const
bool operator>(const SharedUserValue &other) const
SharedUserValue(ArbiterUserValue value)