Wildmeshing Toolkit
as_variant_type.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <tuple>
3
#include <variant>
4
5
6
namespace
wmtk::utils::metaprogramming::tuple
{
7
8
9
// given a set of types, a tuple without the voids and makes unique types
10
namespace
detail {
11
template
<
typename
T>
12
struct
as_variant_type
13
{
14
};
15
template
<
typename
... Ts>
16
struct
as_variant_type
<
std
::tuple<Ts...>>
17
{
18
using
type
= std::variant<Ts...>;
19
};
20
21
}
// namespace detail
22
23
// from a tuple input
24
template
<
typename
T>
25
using
as_variant_type_t
=
typename
detail::as_variant_type<T>::type
;
26
27
28
}
// namespace wmtk::utils::metaprogramming::tuple
29
std
Definition:
autodiff.h:995
wmtk::utils::metaprogramming::tuple
Definition:
as_variant_type.hpp:6
wmtk::utils::metaprogramming::tuple::as_variant_type_t
typename detail::as_variant_type< T >::type as_variant_type_t
Definition:
as_variant_type.hpp:25
wmtk::utils::metaprogramming::tuple::detail::as_variant_type< std::tuple< Ts... > >::type
std::variant< Ts... > type
Definition:
as_variant_type.hpp:18
wmtk::utils::metaprogramming::tuple::detail::as_variant_type
Definition:
as_variant_type.hpp:13
src
wmtk
utils
metaprogramming
tuple
as_variant_type.hpp
Generated by
1.9.1