hpx::any_nonser. hpx::bad_any_cast, hpx::unique_any_nonser, hpx::any_cast, hpx::make_any_nonser, hpx::make_unique_any_nonser#

Defined in header hpx/any.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

template<>
class hpx::util::basic_any<void, void, void, std::true_type>#

Public Functions

inline constexpr basic_any() noexcept#
inline basic_any(basic_any const &x)#
inline basic_any(basic_any &&x) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_copy_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)#
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)#
inline ~basic_any()#
inline basic_any &operator=(basic_any const &x)#
inline basic_any &operator=(basic_any &&rhs) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs)#
inline basic_any &swap(basic_any &x) noexcept#
inline std::type_info const &type() const#
template<typename T>
inline T const &cast() const#
inline bool has_value() const noexcept#
inline void reset()#

Private Functions

inline basic_any &assign(basic_any const &x)#

Private Members

detail::any::fxn_ptr_table<void, void, void, std::true_type> *table#
void *object#

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)#
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)#
template<typename Char>
class hpx::util::basic_any<void, void, Char, std::true_type>#

Public Functions

inline constexpr basic_any() noexcept#
inline basic_any(basic_any const &x)#
inline basic_any(basic_any &&x) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_copy_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)#
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)#
inline ~basic_any()#
inline basic_any &operator=(basic_any const &x)#
inline basic_any &operator=(basic_any &&rhs) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs) noexcept#
inline basic_any &swap(basic_any &x) noexcept#
inline std::type_info const &type() const#
template<typename T>
inline T const &cast() const#
inline bool has_value() const noexcept#
inline void reset()#

Private Functions

inline basic_any &assign(basic_any const &x)#

Private Members

detail::any::fxn_ptr_table<void, void, Char, std::true_type> *table#
void *object#

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)#
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)#
template<>
class hpx::util::basic_any<void, void, void, std::false_type>#

Public Functions

inline constexpr basic_any() noexcept#
inline basic_any(basic_any &&x) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_move_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)#
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)#
basic_any(basic_any const &x) = delete#
basic_any &operator=(basic_any const &x) = delete#
inline ~basic_any()#
inline basic_any &operator=(basic_any &&rhs) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_move_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs)#
inline basic_any &swap(basic_any &x) noexcept#
inline std::type_info const &type() const#
template<typename T>
inline T const &cast() const#
inline bool has_value() const noexcept#
inline void reset()#

Private Members

detail::any::fxn_ptr_table<void, void, void, std::false_type> *table#
void *object#

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)#
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)#
template<typename Char>
class hpx::util::basic_any<void, void, Char, std::false_type>#

Public Functions

inline constexpr basic_any() noexcept#
inline basic_any(basic_any &&x) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_move_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)#
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)#
basic_any(basic_any const &x) = delete#
basic_any &operator=(basic_any const &x) = delete#
inline ~basic_any()#
inline basic_any &operator=(basic_any &&rhs) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_move_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs) noexcept#
inline basic_any &swap(basic_any &x) noexcept#
inline std::type_info const &type() const#
template<typename T>
inline T const &cast() const#
inline bool has_value() const noexcept#
inline void reset()#

Private Members

detail::any::fxn_ptr_table<void, void, Char, std::false_type> *table#
void *object#

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)#
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)#
namespace hpx

Top level HPX namespace.

Typedefs

using any_nonser = util::basic_any<void, void, void, std::true_type>#
using unique_any_nonser = util::basic_any<void, void, void, std::false_type>#

Functions

template<typename T, typename ...Ts>
util::basic_any<void, void, void, std::true_type> make_any_nonser(Ts&&... ts)#
template<typename T, typename U, typename ...Ts>
util::basic_any<void, void, void, std::true_type> make_any_nonser(std::initializer_list<U> il, Ts&&... ts)#
template<typename T, typename ...Ts>
util::basic_any<void, void, void, std::false_type> make_unique_any_nonser(Ts&&... ts)#
template<typename T, typename U, typename ...Ts>
util::basic_any<void, void, void, std::false_type> make_unique_any_nonser(std::initializer_list<U> il, Ts&&... ts)#
template<typename T>
util::basic_any<void, void, void, std::true_type> make_any_nonser(T &&t)#
template<typename T>
util::basic_any<void, void, void, std::false_type> make_unique_any_nonser(T &&t)#
template<typename T, typename IArch, typename OArch, typename Char, typename Copyable>
T *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 *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 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 &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))

struct bad_any_cast : public bad_cast#
#include <any.hpp>

Defines a type of object to be thrown by the value-returning forms of hpx::any_cast on failure.

Public Functions

inline bad_any_cast(std::type_info const &src, std::type_info const &dest)#

Constructs a new bad_any_cast object with an implementation-defined null-terminated byte string which is accessible through what().

inline char const *what() const noexcept override#

Returns the explanatory string.

Note

Implementations are allowed but not required to override what().

Returns

Pointer to a null-terminated string with explanatory information. The string is suitable for conversion and display as a std::wstring. The pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed, or until a non-const member function (e.g. copy assignment operator) on the exception object is called.

Public Members

char const *from#
char const *to#
namespace util

Typedefs

using streamable_any_nonser = basic_any<void, void, char, std::true_type>#
using streamable_wany_nonser = basic_any<void, void, wchar_t, std::true_type>#
using streamable_unique_any_nonser = basic_any<void, void, char, std::false_type>#
using streamable_unique_wany_nonser = basic_any<void, void, wchar_t, std::false_type>#

Functions

template<typename IArch, typename OArch, typename Char, typename Copyable, typename Enable = std::enable_if_t<!std::is_void_v<Char>>>
std::basic_istream<Char> &operator>>(std::basic_istream<Char> &i, basic_any<IArch, OArch, Char, Copyable> &obj)#
template<typename IArch, typename OArch, typename Char, typename Copyable, typename Enable = std::enable_if_t<!std::is_void_v<Char>>>
std::basic_ostream<Char> &operator<<(std::basic_ostream<Char> &o, basic_any<IArch, OArch, Char, Copyable> const &obj)#
template<typename IArch, typename OArch, typename Char, typename Copyable>
void swap(basic_any<IArch, OArch, Char, Copyable> &lhs, basic_any<IArch, OArch, Char, Copyable> &rhs) noexcept#
template<typename T, typename Char, typename ...Ts>
basic_any<void, void, Char, std::true_type> make_streamable_any_nonser(Ts&&... ts)#
template<typename T, typename Char, typename U, typename ...Ts>
basic_any<void, void, Char, std::true_type> make_streamable_any_nonser(std::initializer_list<U> il, Ts&&... ts)#
template<typename T, typename Char, typename ...Ts>
basic_any<void, void, Char, std::false_type> make_streamable_unique_any_nonser(Ts&&... ts)#
template<typename T, typename Char, typename U, typename ...Ts>
basic_any<void, void, Char, std::false_type> make_streamable_unique_any_nonser(std::initializer_list<U> il, Ts&&... ts)#
template<typename T, typename Char>
basic_any<void, void, Char, std::true_type> make_streamable_any_nonser(T &&t)#
template<typename T, typename Char>
basic_any<void, void, Char, std::false_type> make_streamable_unique_any_nonser(T &&t)#
template<typename IArch, typename OArch, typename Char = char, typename Copyable = std::true_type>
class basic_any#
template<typename Char> false_type >

Public Functions

inline constexpr basic_any() noexcept#
inline basic_any(basic_any &&x) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_move_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)#
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)#
basic_any(basic_any const &x) = delete#
basic_any &operator=(basic_any const &x) = delete#
inline ~basic_any()#
inline basic_any &operator=(basic_any &&rhs) noexcept#
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_move_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs) noexcept#
inline basic_any &swap(basic_any &x) noexcept#
inline std::type_info const &type() const#
template<typename T>
inline T const &cast() const#
inline bool has_value() const noexcept#
inline void reset()#

Private Members

detail::any::fxn_ptr_table<void, void, Char, std::false_type> *table#
void *object#

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)#
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)#
template<typename Char> true_type >

Public Functions

inline constexpr basic_any() noexcept
inline basic_any(basic_any const &x)
inline basic_any(basic_any &&x) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_copy_constructible_v<std::decay_t<T>>>* = nullptr)#
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)
inline ~basic_any()
inline basic_any &operator=(basic_any const &x)
inline basic_any &operator=(basic_any &&rhs) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs) noexcept
inline basic_any &swap(basic_any &x) noexcept
inline std::type_info const &type() const
template<typename T>
inline T const &cast() const
inline bool has_value() const noexcept
inline void reset()

Private Functions

inline basic_any &assign(basic_any const &x)#

Private Members

detail::any::fxn_ptr_table<void, void, Char, std::true_type> *table
void *object

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)
template<> false_type >

Public Functions

inline constexpr basic_any() noexcept
inline basic_any(basic_any &&x) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_move_constructible_v<std::decay_t<T>>>* = nullptr)
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)
basic_any(basic_any const &x) = delete
basic_any &operator=(basic_any const &x) = delete
inline ~basic_any()
inline basic_any &operator=(basic_any &&rhs) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_move_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs)
inline basic_any &swap(basic_any &x) noexcept
inline std::type_info const &type() const
template<typename T>
inline T const &cast() const
inline bool has_value() const noexcept
inline void reset()

Private Members

detail::any::fxn_ptr_table<void, void, void, std::false_type> *table
void *object

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)
template<> true_type >

Public Functions

inline constexpr basic_any() noexcept
inline basic_any(basic_any const &x)
inline basic_any(basic_any &&x) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>>>>
inline explicit basic_any(T &&x, std::enable_if_t<std::is_copy_constructible_v<std::decay_t<T>>>* = nullptr)
template<typename T, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, Ts&&... ts)
template<typename T, typename U, typename ...Ts, typename Enable = std::enable_if_t<std::is_constructible_v<std::decay_t<T>, Ts...> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline explicit basic_any(std::in_place_type_t<T>, std::initializer_list<U> il, Ts&&... ts)
inline ~basic_any()
inline basic_any &operator=(basic_any const &x)
inline basic_any &operator=(basic_any &&rhs) noexcept
template<typename T, typename Enable = std::enable_if_t<!std::is_same_v<basic_any, std::decay_t<T>> && std::is_copy_constructible_v<std::decay_t<T>>>>
inline basic_any &operator=(T &&rhs)
inline basic_any &swap(basic_any &x) noexcept
inline std::type_info const &type() const
template<typename T>
inline T const &cast() const
inline bool has_value() const noexcept
inline void reset()

Private Functions

inline basic_any &assign(basic_any const &x)

Private Members

detail::any::fxn_ptr_table<void, void, void, std::true_type> *table
void *object

Private Static Functions

template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::true_type, Ts&&... ts)
template<typename T, typename ...Ts>
static inline void new_object(void *&object, std::false_type, Ts&&... ts)