Wildmeshing Toolkit
Loading...
Searching...
No Matches
ReferenceWrapperVariant.hpp
Go to the documentation of this file.
1#pragma once
2#include <functional>
3#include <type_traits>
4#include <utility>
5#include <variant>
6
8
9// My target application's "Input" class is quite heavy and the Input objects
10// persist for int64_t periods of time relative to what this is being used for, so
11// I want to use a variant of references rather than values
12//
13// Here's a helper definition for making variants of references
14template <typename... T>
15using ReferenceWrapperVariant = std::variant<std::reference_wrapper<T>...>;
16
17
18} // namespace wmtk::utils::metaprogramming
std::variant< std::reference_wrapper< T >... > ReferenceWrapperVariant