Update documentation for cpptrace::nullable

This commit is contained in:
Jeremy Rifkin 2025-02-17 23:01:00 -06:00
parent 34be9f2f19
commit 5073cc218a
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4

View File

@ -816,6 +816,7 @@ namespace cpptrace {
template<typename T, typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
struct nullable {
T raw_value;
// all members are constexpr for c++17 and beyond, some are constexpr before c++17
nullable& operator=(T value)
bool has_value() const noexcept;
T& value() noexcept;
@ -825,6 +826,7 @@ namespace cpptrace {
void reset() 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
};