Project Alice
Loading...
Searching...
No Matches
Cyto::Any Class Reference

#include <cyto_any.hpp>

Public Member Functions

constexpr Any () noexcept
 
template<class V , class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< V >, int > = 0>
 Any (V &&v)
 
template<class V , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< T >, int > = 0>
 Any (std::in_place_type_t< V > vtype, Args &&... args)
 
template<class V , class U , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyInitializerListConstructible< T, U, Args... >, int > = 0>
 Any (std::in_place_type_t< V > vtype, std::initializer_list< U > list, Args &&... args)
 
 Any (Any const &other)
 
 Any (Any &&other) noexcept
 
Anyoperator= (Any const &other)
 
Anyoperator= (Any &&other) noexcept
 
template<class V , class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< T >, int > = 0>
Anyoperator= (V &&v)
 
 ~Any ()
 
template<class V , class... Args, class T = std::decay_t<V>, std::enable_if_t< std::is_constructible_v< T, Args... > &&std::is_copy_constructible_v< T >, int > = 0>
T & emplace (Args &&... args)
 
template<class V , class U , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyInitializerListConstructible< T, U, Args... >, int > = 0>
T & emplace (std::initializer_list< U > list, Args &&... args)
 
ANY_ALWAYS_INLINE void reset ()
 
ANY_ALWAYS_INLINE void swap (Any &rhs) noexcept
 
template<bool B>
ANY_ALWAYS_INLINE bool has_value () const noexcept
 
ANY_ALWAYS_INLINE bool has_value () const noexcept
 
template<typename CHECK_TYPE >
ANY_ALWAYS_INLINE bool holds_type () const noexcept
 

Friends

template<class V >
std::remove_cv_t< std::remove_reference_t< V > > * any_cast (Any *a) noexcept
 

Detailed Description

Definition at line 313 of file cyto_any.hpp.

Constructor & Destructor Documentation

◆ Any() [1/6]

constexpr Cyto::Any::Any ( )
inlineconstexprnoexcept

Definition at line 315 of file cyto_any.hpp.

◆ Any() [2/6]

template<class V , class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< V >, int > = 0>
Cyto::Any::Any ( V &&  v)
inline

Definition at line 318 of file cyto_any.hpp.

◆ Any() [3/6]

template<class V , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< T >, int > = 0>
Cyto::Any::Any ( std::in_place_type_t< V >  vtype,
Args &&...  args 
)
inlineexplicit

Definition at line 323 of file cyto_any.hpp.

◆ Any() [4/6]

template<class V , class U , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyInitializerListConstructible< T, U, Args... >, int > = 0>
Cyto::Any::Any ( std::in_place_type_t< V >  vtype,
std::initializer_list< U >  list,
Args &&...  args 
)
inlineexplicit

Definition at line 329 of file cyto_any.hpp.

◆ Any() [5/6]

Cyto::Any::Any ( Any const &  other)
inline

Definition at line 333 of file cyto_any.hpp.

◆ Any() [6/6]

Cyto::Any::Any ( Any &&  other)
inlinenoexcept

Definition at line 337 of file cyto_any.hpp.

◆ ~Any()

Cyto::Any::~Any ( )
inline

Definition at line 367 of file cyto_any.hpp.

Member Function Documentation

◆ emplace() [1/2]

template<class V , class... Args, class T = std::decay_t<V>, std::enable_if_t< std::is_constructible_v< T, Args... > &&std::is_copy_constructible_v< T >, int > = 0>
T & Cyto::Any::emplace ( Args &&...  args)
inline

Definition at line 373 of file cyto_any.hpp.

◆ emplace() [2/2]

template<class V , class U , class... Args, class T = std::decay_t<V>, std::enable_if_t< IsAnyInitializerListConstructible< T, U, Args... >, int > = 0>
T & Cyto::Any::emplace ( std::initializer_list< U >  list,
Args &&...  args 
)
inline

Definition at line 381 of file cyto_any.hpp.

◆ has_value() [1/2]

template<bool B>
ANY_ALWAYS_INLINE bool Cyto::Any::has_value ( ) const
inlinenoexcept

Definition at line 413 of file cyto_any.hpp.

◆ has_value() [2/2]

ANY_ALWAYS_INLINE bool Cyto::Any::has_value ( ) const
inlinenoexcept

Definition at line 418 of file cyto_any.hpp.

◆ holds_type()

template<typename CHECK_TYPE >
ANY_ALWAYS_INLINE bool Cyto::Any::holds_type ( ) const
inlinenoexcept

Definition at line 429 of file cyto_any.hpp.

Here is the caller graph for this function:

◆ operator=() [1/3]

Any & Cyto::Any::operator= ( Any &&  other)
inlinenoexcept

Definition at line 351 of file cyto_any.hpp.

◆ operator=() [2/3]

Any & Cyto::Any::operator= ( Any const &  other)
inline

Definition at line 342 of file cyto_any.hpp.

◆ operator=() [3/3]

template<class V , class T = std::decay_t<V>, std::enable_if_t< IsAnyConstructible< T >, int > = 0>
Any & Cyto::Any::operator= ( V &&  v)
inline

Definition at line 362 of file cyto_any.hpp.

◆ reset()

ANY_ALWAYS_INLINE void Cyto::Any::reset ( )
inline

Definition at line 388 of file cyto_any.hpp.

◆ swap()

ANY_ALWAYS_INLINE void Cyto::Any::swap ( Any rhs)
inlinenoexcept

Definition at line 394 of file cyto_any.hpp.

Friends And Related Function Documentation

◆ any_cast

template<class V >
std::remove_cv_t< std::remove_reference_t< V > > * any_cast ( Any a)
friend

Definition at line 499 of file cyto_any.hpp.


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