19 using type = std::remove_cv_t<std::remove_reference_t<T>>;
35 struct UnderlyingType<const T>
37 using type =
typename UnderlyingType<T>::type;
41 struct UnderlyingType<T&>
43 using type =
typename UnderlyingType<T>::type;
47 struct UnderlyingType<T*>
49 using type =
typename UnderlyingType<T>::type;
53 struct UnderlyingType<std::reference_wrapper<T>>
55 using type =
typename UnderlyingType<T>::type;
59 struct UnderlyingType<std::shared_ptr<T>>
61 using type =
typename UnderlyingType<T>::type;
65 struct UnderlyingType<std::unique_ptr<T>>
67 using type =
typename UnderlyingType<T>::type;
72 using Underlying_t =
typename Impl::UnderlyingType<T>::type;
76 #define FWD(...) static_cast<decltype(__VA_ARGS__)>(__VA_ARGS__) 79 #define TYPEOF(...) AMDiS::remove_cvref_t<decltype(__VA_ARGS__)> 82 #define VALUE(...) TYPEOF(__VA_ARGS__)::value 87 template <
class... Ts>
90 template <
class... Ts>
101 template <
class... T>
102 constexpr
void operator()(T&&...)
const { }
109 return std::make_unique<TYPEOF(obj)>(FWD(obj));
113 auto makeSharedPtr(Obj&& obj)
115 return std::make_shared<TYPEOF(obj)>(FWD(obj));
119 using enable_if_all_t = std::enable_if_t<(b &&...)>;
A functor with no operation.
Definition: TypeTraits.hpp:99
A variadic type list.
Definition: TypeTraits.hpp:88
typename remove_cvref< T >::type remove_cvref_t
Helper alias template for remove_cvref.
Definition: TypeTraits.hpp:24
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
Remove cv and ref qualifiers of type T.
Definition: TypeTraits.hpp:17
auto makeUniquePtr(Obj &&obj)
Create a unique_ptr by copy/move construction.
Definition: TypeTraits.hpp:107
T owner
Alias that indicates ownership of resources.
Definition: TypeTraits.hpp:96