CVB++ 15.0
monostate Struct Reference

Unit type intended for use as a well-behaved empty alternative in Shims::variant. More...

#include <variant.hpp>

Related Symbols

(Note that these are not member symbols.)

constexpr bool operator< (monostate, monostate) noexcept
 
constexpr bool operator> (monostate, monostate) noexcept
 
constexpr bool operator<= (monostate, monostate) noexcept
 
constexpr bool operator>= (monostate, monostate) noexcept
 
constexpr bool operator== (monostate, monostate) noexcept
 
constexpr bool operator!= (monostate, monostate) noexcept
 

Detailed Description

Unit type intended for use as a well-behaved empty alternative in Shims::variant.

In particular, a Shims::variant of non-default-constructible types may list monostate as its first alternative: this makes the Shims::variant itself default-constructible.

Friends And Related Symbol Documentation

◆ operator!=()

bool operator!= ( monostate ,
monostate  )
related

Always compares to false.

◆ operator<()

bool operator< ( monostate ,
monostate  )
related

Always compares to false.

◆ operator<=()

bool operator<= ( monostate ,
monostate  )
related

Always compares to true.

◆ operator==()

bool operator== ( monostate ,
monostate  )
related

Always compares to true.

◆ operator>()

bool operator> ( monostate ,
monostate  )
related

Always compares to false.

◆ operator>=()

bool operator>= ( monostate ,
monostate  )
related

Always compares to true.