Audacity 3.2.0
|
Generates distinct, non-interconvertible types wrapping std::any. More...
#include <TypedAny.h>
Classes | |
struct | Good_args |
struct | Good_args< Arg > |
Public Member Functions | |
template<typename... Args, typename restriction = std::enable_if_t< Good_args<Args...>::value >> | |
TypedAny (Args &&... args) | |
Constructor with arguments just as for std::any, but it is explicit. More... | |
TypedAny (const TypedAny &)=default | |
TypedAny & | operator= (const TypedAny &)=default |
TypedAny (TypedAny &&)=default | |
TypedAny & | operator= (TypedAny &&)=default |
Private Attributes | |
std::any | mAny |
Pass-through member functions | |
Supply an imitation of std::any's interface, except for reference-valued any_cast | |
template<typename ValueType , typename... Args> | |
std::decay_t< ValueType > & | emplace (Args &&... args) |
void | reset () noexcept |
void | swap (TypedAny &other) noexcept |
bool | has_value () const noexcept |
const std::type_info & | type () const noexcept |
template<typename T > | |
const T * | cast () const noexcept |
Like pointer-valued any_cast but a non-static member function. More... | |
template<typename T > | |
T * | cast () noexcept |
Like pointer-valued any_cast but a non-static member function. More... | |
template<typename T , typename... Args> | |
static TypedAny | make (Args &&... args) |
Like make_any but a static member function. More... | |
Generates distinct, non-interconvertible types wrapping std::any.
Tag | discriminates generated classes; a "CRTP" parameter |
Definition at line 24 of file TypedAny.h.
|
inlineexplicit |
Constructor with arguments just as for std::any, but it is explicit.
Definition at line 39 of file TypedAny.h.
References forward.
Referenced by audacity::TypedAny< Tag >::make().
|
default |
|
default |
|
inlinenoexcept |
Like pointer-valued any_cast but a non-static member function.
Definition at line 68 of file TypedAny.h.
References audacity::TypedAny< Tag >::mAny.
Referenced by EffectSettings::Copy(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::GetSettings(), and DynamicRangeProcessorEditor::UpdateUI().
|
inlinenoexcept |
Like pointer-valued any_cast but a non-static member function.
Definition at line 72 of file TypedAny.h.
References audacity::TypedAny< Tag >::mAny.
|
inline |
Definition at line 57 of file TypedAny.h.
References audacity::TypedAny< Tag >::mAny.
|
inlinenoexcept |
|
inlinestatic |
Like make_any but a static member function.
Definition at line 76 of file TypedAny.h.
References audacity::TypedAny< Tag >::TypedAny().
|
default |
|
default |
|
inlinenoexcept |
Definition at line 61 of file TypedAny.h.
References audacity::TypedAny< Tag >::mAny.
|
inlinenoexcept |
Definition at line 62 of file TypedAny.h.
References audacity::TypedAny< Tag >::mAny.
Referenced by audacity::swap().
|
inlinenoexcept |
|
private |
Definition at line 84 of file TypedAny.h.
Referenced by audacity::TypedAny< Tag >::cast(), audacity::TypedAny< Tag >::emplace(), audacity::TypedAny< Tag >::has_value(), audacity::TypedAny< Tag >::reset(), audacity::TypedAny< Tag >::swap(), and audacity::TypedAny< Tag >::type().