neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
variant.hpp File Reference
#include <neolib/neolib.hpp>
#include <type_traits>
#include <optional>
#include <variant>
#include <neolib/core/variadic.hpp>
#include <neolib/core/i_variant.hpp>

Go to the source code of this file.

Classes

struct  std::variant_size< neolib::variant< Type > >
 
struct  std::variant_size< neolib::variant< Types... > >
 
struct  neolib::from_abstract_next< AbstractT, Type >
 
struct  neolib::from_abstract_next< AbstractT, Type, Rest >
 
struct  neolib::from_abstract_next< AbstractT, Type, Rest... >
 
struct  neolib::from_abstract< true, AbstractT, Type >
 
struct  neolib::from_abstract< true, AbstractT, Type, Rest... >
 
struct  neolib::from_abstract< false, AbstractT, Type >
 
struct  neolib::from_abstract< false, AbstractT, Type, Rest... >
 
class  neolib::variant< Types >
 
struct  neolib::bad_numeric_variant_cast
 

Namespaces

namespace  neolib
 
namespace  std
 

Typedefs

using neolib::none_t = std::monostate
 
template<typename AbstractT , typename... Type>
using neolib::from_abstract_t = typename from_abstract_next< AbstractT, Type... >::result_type
 

Functions

template<typename Visitor , typename... Types>
constexpr decltype(auto) std::visit (Visitor &&vis, neolib::variant< Types... > &&var)
 
template<typename Visitor , typename... Types>
constexpr decltype(auto) std::visit (Visitor &&vis, neolib::variant< Types... > const &var)
 
template<typename Visitor , typename... Types>
constexpr decltype(auto) std::visit (Visitor &&vis, neolib::variant< Types... > &var)
 
template<typename T , typename... Types>
constexpr bool std::holds_alternative (neolib::variant< Types... > const &var) noexcept
 
template<typename T , typename... Types>
constexpr T & std::get (neolib::variant< Types... > &var)
 
template<typename T , typename... Types>
constexpr T && std::get (neolib::variant< Types... > &&var)
 
template<typename T , typename... Types>
constexpr const T & std::get (const neolib::variant< Types... > &var)
 
template<typename T , typename... Types>
constexpr const T && std::get (const neolib::variant< Types... > &&var)
 
template<typename... Types>
bool neolib::operator== (none_t const &, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator== (variant< Types... > const &lhs, none_t const &) noexcept
 
template<typename... Types>
bool neolib::operator!= (none_t const &, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator!= (variant< Types... > const &lhs, none_t const &) noexcept
 
template<typename... Types>
bool neolib::operator== (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator!= (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator< (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator<= (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator> (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
bool neolib::operator>= (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename... Types>
auto neolib::operator<=> (variant< Types... > const &lhs, variant< Types... > const &rhs) noexcept
 
template<typename T , typename Variant >
autoneolib::static_variant_cast (const Variant &var)
 
template<typename T , typename Variant >
autoneolib::static_variant_cast (Variant &var)
 
template<typename T , typename Variant >
T neolib::static_numeric_variant_cast (const Variant &var)
 
template<typename T , typename Variant >
T neolib::static_numeric_variant_cast (Variant &var)
 
template<typename T , typename Variant , std::size_t index = 0>
constexpr std::size_t neolib::variant_index_of ()
 

Variables

const none_t neolib::none
 
template<typename AbstractT , typename Type >
constexpr bool neolib::is_variant_convertible_v = std::is_base_of_v<AbstractT, Type> && std::is_abstract_v<AbstractT>