Function destroy

Synopsis

#include <include/type_safe/tagged_union.hpp>

template <typename... Types>
void destroy(tagged_union< Types... > &u) noexcept

Description

\effects Destroys the type currently stored in the [ts::tagged_union](), by calling u.destroy(union_type<T>{}). \module variant

Source

Lines 425-429 in include/type_safe/tagged_union.hpp.

template <typename... Types>
void destroy(tagged_union<Types...>& u) noexcept
{
    detail::destroy_union<tagged_union<Types...>>::destroy(u);
}





Add Discussion as Guest

Log in