tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
monostate Struct Reference

Unit type intended for use as a well-behaved empty alternative in etl::variant. In particular, a variant of non-default-constructible types may list etl::monostate as its first alternative: this makes the variant itself default-constructible. More...

#include <etl/variant.hpp>

Friends

constexpr auto operator<=> (monostate, monostate) noexcept -> etl::strong_ordering
 All instances of etl::monostate compare equal.
 
constexpr auto operator== (monostate, monostate) noexcept -> bool
 All instances of etl::monostate compare equal.
 

Detailed Description

Unit type intended for use as a well-behaved empty alternative in etl::variant. In particular, a variant of non-default-constructible types may list etl::monostate as its first alternative: this makes the variant itself default-constructible.

Friends And Related Symbol Documentation

◆ operator<=>

auto operator<=> ( monostate ,
monostate  ) -> etl::strong_ordering
friend

All instances of etl::monostate compare equal.

◆ operator==

auto operator== ( monostate ,
monostate  ) -> bool
friend

All instances of etl::monostate compare equal.


The documentation for this struct was generated from the following file: