ECSTASY
All in the name
Loading...
Searching...
No Matches
add_optional.hpp
Go to the documentation of this file.
1
11
12#ifndef UTIL_META_ADD_OPTIONAL_HPP_
13#define UTIL_META_ADD_OPTIONAL_HPP_
14
15#include <optional>
16
17namespace util::meta
18{
30 template <typename T>
31 struct add_optional {
33 };
34
36 template <typename T>
37 struct add_optional<T &> {
39 };
40
42 template <typename T>
43 struct add_optional<std::optional<T>> {
45 };
46
55 template <typename T>
57} // namespace util::meta
58
59#endif /* !UTIL_META_ADD_OPTIONAL_HPP_ */
Namespace regrouping all meta programmation helper types.
typename add_optional< T >::type add_optional_t
Helper to add_optional<T>::type.
Add optional to a type if required.