Bayes Filters Library
Classes | Functions
bfl::any Namespace Reference

Classes

class  any
 The class any describes a type-safe container for single values of any type. More...
 
class  bad_any_cast
 Defines a type of object to be thrown by the value-returning forms of blf::any::any_cast on failure. More...
 

Functions

void swap (any &lhs, any &rhs) noexcept
 Overloads the std::swap algorithm for std::any. More...
 
template<typename ValueType >
ValueType * any_cast (any *operand) noexcept
 Performs type-safe access to the contained object. More...
 
template<typename ValueType >
const ValueType * any_cast (const any *operand) noexcept
 Performs type-safe access to the contained object. More...
 
template<typename ValueType >
ValueType any_cast (any &operand)
 Performs type-safe access to the contained object. More...
 
template<typename ValueType >
ValueType any_cast (const any &operand)
 Performs type-safe access to the contained object. More...
 
template<typename ValueType >
ValueType any_cast (any &&operand)
 Performs type-safe access to the contained object. More...
 

Function Documentation

◆ any_cast() [1/5]

template<typename ValueType >
ValueType bfl::any::any_cast ( any &&  operand)
inline

Performs type-safe access to the contained object.

Throws blf::any::bad_any_cast if the typeid of the requested ValueType does not match that of the contents of operand.

Parameters
operandtarget any object

Definition at line 422 of file any.h.

◆ any_cast() [2/5]

template<typename ValueType >
ValueType bfl::any::any_cast ( any operand)

Performs type-safe access to the contained object.

Throws blf::any::bad_any_cast if the typeid of the requested ValueType does not match that of the contents of operand.

Parameters
operandtarget any object

Definition at line 382 of file any.h.

References bfl::any::any::type().

Here is the call graph for this function:

◆ any_cast() [3/5]

template<typename ValueType >
ValueType* bfl::any::any_cast ( any operand)
noexcept

Performs type-safe access to the contained object.

Throws blf::any::bad_any_cast if the typeid of the requested ValueType does not match that of the contents of operand.

Parameters
operandtarget any object

Definition at line 352 of file any.h.

References bfl::any::any::holder< ValueType >::held.

◆ any_cast() [4/5]

template<typename ValueType >
ValueType bfl::any::any_cast ( const any operand)
inline

Performs type-safe access to the contained object.

Throws blf::any::bad_any_cast if the typeid of the requested ValueType does not match that of the contents of operand.

Parameters
operandtarget any object

Definition at line 405 of file any.h.

◆ any_cast() [5/5]

template<typename ValueType >
const ValueType* bfl::any::any_cast ( const any operand)
inlinenoexcept

Performs type-safe access to the contained object.

Throws blf::any::bad_any_cast if the typeid of the requested ValueType does not match that of the contents of operand.

Parameters
operandtarget any object

Definition at line 367 of file any.h.

◆ swap()

void bfl::any::swap ( any lhs,
any rhs 
)
inlinenoexcept

Overloads the std::swap algorithm for std::any.

Swaps the content of two any objects by calling lhs.swap(rhs).

Parameters
lhsobjects to swap
rhsobjects to swap

Definition at line 317 of file any.h.

References bfl::any::any::swap().

Referenced by bfl::any::any::swap().

Here is the call graph for this function: