28 #ifndef OPM_CONDITIONAL_STORAGE_HH 29 #define OPM_CONDITIONAL_STORAGE_HH 31 #include <opm/common/utility/gpuDecorators.hpp> 32 #include <opm/common/ErrorMacros.hpp> 35 #include <type_traits> 48 template <
bool cond,
class T>
53 static constexpr
bool condition = cond;
66 template <
class ...Args>
76 : data_(std::move(t.data_))
87 data_ = std::move(v.data_);
91 OPM_HOST_DEVICE
const T& operator*()
const 93 OPM_HOST_DEVICE T& operator*()
96 OPM_HOST_DEVICE
const T* operator->()
const 98 OPM_HOST_DEVICE T* operator->()
101 OPM_HOST_DEVICE
operator const T&()
const 103 OPM_HOST_DEVICE
operator T&()
115 static constexpr
bool condition =
false;
119 static_assert(std::is_default_constructible_v<T>);
124 static_assert(std::is_copy_constructible_v<T>);
132 template <
class ...Args>
135 static_assert(std::is_constructible_v<T, Args...>);
140 static_assert(std::is_copy_assignable_v<T>);
A simple class which only stores a given member attribute if a boolean condition is true...
Definition: ConditionalStorage.hpp:49
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30