Class any_comparable

Nested Relationships

Nested Types

Class Documentation

class any_comparable

Public Functions

inline any_comparable()
inline any_comparable(const any_comparable &other)
any_comparable(any_comparable &&other) = default
template<typename ValueType, typename = std::enable_if_t<!std::is_base_of<any_comparable, std::decay_t<ValueType>>::value && meta::is_less_than_comparable_v<std::decay_t<ValueType>>>>
inline any_comparable(ValueType &&value)
~any_comparable() = default
inline any_comparable &operator=(const any_comparable &rhs)
inline any_comparable &operator=(any_comparable &&rhs)
template<typename ValueType, typename = std::enable_if_t<!std::is_base_of<any_comparable, std::decay_t<ValueType>>::value && meta::is_less_than_comparable_v<std::decay_t<ValueType>>>>
inline any_comparable &operator=(ValueType &&rhs)
template<class ValueType, class ...Args>
inline std::enable_if_t<meta::is_less_than_comparable_v<std::decay_t<ValueType>>, std::decay_t<ValueType>&> emplace(Args&&... args)
template<class ValueType, class U, class ...Args>
inline std::enable_if_t<meta::is_less_than_comparable_v<std::decay_t<ValueType>>, std::decay_t<ValueType>&> emplace(std::initializer_list<U> il, Args&&... args)
inline void reset()
inline void swap(any_comparable &other)
inline bool has_value() const
inline const std::type_info &type() const

Friends

inline friend bool operator<(const any_comparable &a, const any_comparable &b)

Note

will check that the types match if NDEBUG is not defined.

Parameters:
  • a – first object to compare

  • b – second object to compare

Returns:

true if a is less than b

inline friend bool operator==(const any_comparable &a, const any_comparable &b)

Note

will check that the types match if NDEBUG is not defined.

Parameters:
  • a – first object to compare

  • b – second object to compare

Returns:

true if a is equivalent to b

inline friend bool operator!=(const any_comparable &a, const any_comparable &b)

Note

will check that the types match if NDEBUG is not defined.

Parameters:
  • a – first object to compare

  • b – second object to compare

Returns:

true if a is not equivalent to b