Update documentation for cpptrace::nullable
This commit is contained in:
parent
34be9f2f19
commit
5073cc218a
@ -816,6 +816,7 @@ namespace cpptrace {
|
|||||||
template<typename T, typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
|
||||||
struct nullable {
|
struct nullable {
|
||||||
T raw_value;
|
T raw_value;
|
||||||
|
// all members are constexpr for c++17 and beyond, some are constexpr before c++17
|
||||||
nullable& operator=(T value)
|
nullable& operator=(T value)
|
||||||
bool has_value() const noexcept;
|
bool has_value() const noexcept;
|
||||||
T& value() noexcept;
|
T& value() noexcept;
|
||||||
@ -825,6 +826,7 @@ namespace cpptrace {
|
|||||||
void reset() noexcept;
|
void reset() noexcept;
|
||||||
bool operator==(const nullable& other) const noexcept;
|
bool operator==(const nullable& other) const noexcept;
|
||||||
bool operator!=(const nullable& other) const noexcept;
|
bool operator!=(const nullable& other) const noexcept;
|
||||||
|
constexpr static T null_value() noexcept; // returns the raw null value
|
||||||
constexpr static nullable null() noexcept; // returns a null instance
|
constexpr static nullable null() noexcept; // returns a null instance
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user