Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::any Struct Reference

Friends

template<typename T >
meta::if_c< std::is_reference< T >)||(bool) copyable< T >, T > any_cast (any &&)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
meta::if_c< std::is_reference< T >)||(bool) copyable< T >, T > any_cast (any &)
 
template<typename T >
T * any_cast (any *) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
meta::if_c< std::is_reference< T >)||(bool) copyable< T >, T > any_cast (any const &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
const T * any_cast (any const *) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void swap (any &x, any &y) noexcept
 

Public Member Functions

 any (any const &that)
 
template<typename TRef , typename T = detail::decay_t<TRef>>
 any (TRef &&t) requires copyable< T > &&(!same_as< T
 
void clear () noexcept
 
bool empty () const noexcept
 
anyoperator= (any &&) noexcept=default
 
anyoperator= (any const &that)
 
template<typename TRef , typename T = detail::decay_t<TRef>>
auto operator= (TRef &&t) -> any &requires copyable< T > &&(!same_as< T, any >)
 
void swap (any &that) noexcept
 
const std::type_info & type () const noexcept
 

Public Attributes

any __pad0__: ptr_(new impl<T>(static_cast<TRef &&>(t))) {} any(any &&) noexcept = default
 

Methods

◆ any_cast

template<typename T >
meta::if_c<std::is_reference<T>) || (bool)copyable<T>, T> any_cast ( any x)
friend
Exceptions
bad_any_cast