5 #ifndef MAKEDERIVEDVARIANT_H
6 #define MAKEDERIVEDVARIANT_H
13 static T lvalue(T &&
a) {
return a;}
16 template <
class T,
typename...Args>
17 constexpr std::variant<
Args..., T>
extend(
const std::variant<Args...> &,
const T &) {
18 return std::variant<
Args..., T>();
22 template <
typename TypeHelper,
24 std::size_t
N = std::variant_size_v<VariantType> >
32 template<
typename TypeHelper,
35 using variant_type = std::variant< typename TypeHelper::template type< decltype( lvalue( std::get<0>(VariantType{}))) > > ;