hpx::any_cast#
Defined in header hpx/any.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
template<typename T, typename IArch, typename OArch, typename Char, typename Copyable>
T *hpx::any_cast(util::basic_any<IArch, OArch, Char, Copyable> *operand) noexcept# Performs type-safe access to the contained object.
- Parameters
operand – target any object
- Returns
If operand is not a null pointer, and the typeid of the requested T matches that of the contents of operand, a pointer to the value contained by operand, otherwise a null pointer.
-
template<typename T, typename IArch, typename OArch, typename Char, typename Copyable>
T const *hpx::any_cast(util::basic_any<IArch, OArch, Char, Copyable> const *operand) noexcept# Performs type-safe access to the contained object.
- Parameters
operand – target any object
- Returns
If operand is not a null pointer, and the typeid of the requested T matches that of the contents of operand, a pointer to the value contained by operand, otherwise a null pointer.
-
template<typename T, typename IArch, typename OArch, typename Char, typename Copyable>
T hpx::any_cast(util::basic_any<IArch, OArch, Char, Copyable> &operand)# Performs type-safe access to the contained object. Let U be std::remove_cv_t<std::remove_reference_t<T>> The program is ill-formed if std::is_constructible_v<T, U&> is false.
- Parameters
operand – target any object
- Returns
static_cast<T>(*std::any_cast<U>(&operand))
-
template<typename T, typename IArch, typename OArch, typename Char, typename Copyable>
T const &hpx::any_cast(util::basic_any<IArch, OArch, Char, Copyable> const &operand)# Performs type-safe access to the contained object. Let U be std::remove_cv_t<std::remove_reference_t<T>> The program is ill-formed if std::is_constructible_v<T, const U&> is false.
- Parameters
operand – target any object
- Returns
static_cast<T>(*std::any_cast<U>(&operand))