110 static constexpr uint64_t TYPE_SIZE = algorithm::max(
sizeof(Types)...);
125 template <uint64_t N, typename... CTorArguments>
135 template <typename T, typename... CTorArguments>
141 template <typename T,
142 typename = std::enable_if_t<!std::is_same<std::decay_t<T>,
variant>::value>,
143 typename std::enable_if_t<!internal::is_in_place_index<std::decay_t<T>>::value,
bool> = false,
144 typename std::enable_if_t<!internal::is_in_place_type<std::decay_t<T>>::value,
bool> = false>
179 template <typename T>
180 typename std::enable_if<!std::is_same<T,
variant<Types...>&>::value,
variant<Types...>>::type&
181 operator=(T&& rhs) noexcept;
190 template <uint64_t TypeIndex, typename... CTorArguments>
199 template <typename T, typename... CTorArguments>
200 bool emplace(CTorArguments&&... args) noexcept;
211 template <uint64_t TypeIndex>
212 typename internal::get_type_at_index<0, TypeIndex, Types...>::type*
get_at_index() noexcept;
223 template <uint64_t TypeIndex>
224 const typename internal::get_type_at_index<0, TypeIndex, Types...>::type*
get_at_index() const noexcept;
231 template <typename T>
232 const T*
get() const noexcept;
239 template <typename T>
245 template <typename T>
253 template <typename T>
254 const T*
get_if(const T* defaultValue) const noexcept;
259 constexpr uint64_t
index() const noexcept;
262 alignas(algorithm::max(alignof(Types)...)) internal::byte_t m_storage[TYPE_SIZE]{0u};
263 uint64_t m_type_index = INVALID_VARIANT_INDEX;
266 template <
typename T>
267 bool has_bad_variant_element_access() const noexcept;
268 static
void error_message(const
char* source, const
char* msg) noexcept;
270 void call_element_destructor() noexcept;
internal::get_type_at_index< 0, TypeIndex, Types... >::type * get_at_index() noexcept
returns a pointer to the type stored at index TypeIndex. (not stl compliant)