29 friend struct std::hash<
state<T>>;
34 state() noexcept =
default;
40 state(
const T& value) noexcept;
47 state(
const T& value,
const T& defaultValue) noexcept;
49 state& operator=(
const T& value) noexcept;
51 bool operator==(
const state&)
const noexcept =
default;
52 bool operator==(
const T& value)
const noexcept;
54 T* operator->() noexcept;
55 const T* operator->()
const noexcept;
57 T& operator*() noexcept;
58 const T& operator*()
const noexcept;
63 void reset() noexcept;
void reset() noexcept
Reset current state to its default value.
bool is_default() const noexcept
Is current state default.
#define QX_COPYMOVABLE(className)
Define class as default copyable and movable.