Wildmeshing Toolkit
Loading...
Searching...
No Matches
unwrap_ref.hpp
Go to the documentation of this file.
1
2#pragma once
3#include <functional>
4#include <type_traits>
5#include <utility>
6#include <variant>
7
8
10// Re-implement unwrap ref in case it doesn't exist with our current compiler
11// Implementation is the Possible Implementation from:
12// https://en.cppreference.com/w/cpp/utility/functional/unwrap_reference
13
14template <class T>
16{
17 using type = T;
18};
19template <class U>
20struct unwrap_reference<std::reference_wrapper<U>>
21{
22 using type = U&;
23};
24
25template <class T>
26struct unwrap_ref_decay : unwrap_reference<std::decay_t<T>>
27{
28};
29
30template <class T>
32} // namespace wmtk::utils::metaprogramming
typename unwrap_ref_decay< T >::type unwrap_ref_decay_t