36class any<T, Rest...> :
public any<Rest...>
40 static_assert(is_unique<T, Rest...>);
50 using const_reference =
const T&;
52 using const_pointer =
const T*;
59 any(
const this_type& value,
const Rest&...other) :
base_type(other...), Value(value) { }
60 any(this_type&& value, Rest&&...other) :
base_type(other...), Value(value) { }
61 any(
const any& other) =
default;
62 any(
any&& other) =
default;
72 any& operator=(
const any&) =
default;
73 any& operator=(
any&&) =
default;
81 static_assert(std::disjunction<std::is_same<V, T>, std::is_same<V, Rest>...>{});
82 return static_cast<V&
>(*this);
88 static_assert(std::disjunction<std::is_same<V, T>, std::is_same<V, Rest>...>{});
89 return static_cast<const V&
>(*this);
94 operator reference() {
return Value; }
95 operator const_reference()
const {
return Value; }
96 operator pointer() {
return &Value; }
97 operator const_pointer()
const {
return &Value; }
103 static constexpr size_t Size =
sizeof...(Rest);