di 0.1.0
Loading...
Searching...
No Matches
unwrap_reference.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace di::util {
6namespace detail {
7 struct UnwrapReferenceFunction {
8 template<typename T>
9 constexpr auto operator()(T& value) const -> T& {
10 return value;
11 }
12
13 template<typename T>
14 constexpr auto operator()(ReferenceWrapper<T> value) const -> T& {
15 return value.get();
16 }
17 };
18}
19
20constexpr inline auto unwrap_reference = detail::UnwrapReferenceFunction {};
21}
22
23namespace di {
25}
constexpr auto value
Definition value.h:34
Definition vocab.h:96
constexpr auto unwrap_reference
Definition unwrap_reference.h:20
ReferenceWrapper(T &) -> ReferenceWrapper< T >
Definition any_storable.h:9