49class ConditionalStorage
53 static constexpr bool condition = cond;
55 OPM_HOST_DEVICE ConditionalStorage()
58 OPM_HOST_DEVICE
explicit ConditionalStorage(
const T& v)
62 OPM_HOST_DEVICE
explicit ConditionalStorage(T&& v)
66 template <
class ...Args>
67 OPM_HOST_DEVICE ConditionalStorage(Args... args)
71 OPM_HOST_DEVICE ConditionalStorage(
const ConditionalStorage& t)
75 OPM_HOST_DEVICE ConditionalStorage(ConditionalStorage&& t)
76 : data_(std::move(t.data_))
79 OPM_HOST_DEVICE ConditionalStorage& operator=(
const ConditionalStorage& v)
85 OPM_HOST_DEVICE ConditionalStorage& operator=(ConditionalStorage&& v)
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&()
111class ConditionalStorage<false, T>
115 static constexpr bool condition =
false;
117 OPM_HOST_DEVICE ConditionalStorage()
119 static_assert(std::is_default_constructible_v<T>);
122 OPM_HOST_DEVICE
explicit ConditionalStorage(
const T&)
124 static_assert(std::is_copy_constructible_v<T>);
127 OPM_HOST_DEVICE ConditionalStorage(
const ConditionalStorage &)
132 template <
class ...Args>
133 OPM_HOST_DEVICE ConditionalStorage(Args...)
135 static_assert(std::is_constructible_v<T, Args...>);
138 OPM_HOST_DEVICE ConditionalStorage& operator=(
const ConditionalStorage&)
140 static_assert(std::is_copy_assignable_v<T>);
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30