nullable_traits for types with a sentinel.

Synopsis

Declared in <mrdocs/ADT/Nullable.hpp>

template<class T>
requires (!HasSentinel<T> && ClearableContainerLike<T>)
struct nullable_traits<T>;

Description

Delegates null handling to sentinel_traits<T>.

nullable_traits for clearable empty types.

Treats the empty state as null, creates null via default construction, and erases via clear().

Return true if v is empty.

Static Member Functions

Name

Description

is_null

Return true if v matches the sentinel for T.

make_null

Overwrite v with the sentinel null value.

null

Return the sentinel value representing null.

Return Value

true when the container is empty.

Parameters

Name Description

v

Value to test.

Created with MrDocs