28 #include <boost/variant.hpp>
32 template<
int N,
class... Ts>
using NthTypeOf =
typename std::tuple_element<N, std::tuple<Ts...>>::type;
34 template<
int N,
class... Ts>
38 return boost::get<target>(
v);
41 template<
int N,
class... Ts>
45 return boost::get<target>(
v);
51 template<
int N,
class... Ts>
using NthTypeOf =
typename std::tuple_element<N, std::tuple<Ts...>>::type;
53 template<
int N,
class... Ts>
57 return boost::get<target>(&
v);
60 template<
int N,
class... Ts>
64 return boost::get<const target>(&
v);
68 template<
int N,
class... Ts>
72 return std::holds_alternative<target>(
v) ?
73 &std::get<target>(
v) :
77 template<
int N,
class... Ts>
81 return std::holds_alternative<const target>(
v) ?
82 &std::get<const target>(
v) :