* };
* ```
*
- * @dealiiConceptRequires{std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>}
+ * @dealiiConceptRequires{std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T >}
*/
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
class Lazy
{
public:
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline Lazy<T>::Lazy()
: object_is_initialized(false)
{}
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline Lazy<T>::Lazy(const Lazy &other)
: object(other.object)
{
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline Lazy<T>::Lazy(Lazy &&other) noexcept
: object(other.object)
{
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline Lazy<T> &Lazy<T>::operator=(const Lazy &other)
{
object = other.object;
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline Lazy<T> &Lazy<T>::operator=(Lazy &&other) noexcept
{
object = other.object;
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline void Lazy<T>::reset() noexcept
{
object_is_initialized.store(false);
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
template <typename Callable>
inline DEAL_II_ALWAYS_INLINE
void Lazy<T>::ensure_initialized(const Callable &creator) const
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline DEAL_II_ALWAYS_INLINE bool Lazy<T>::has_value() const
{
//
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline DEAL_II_ALWAYS_INLINE const T &Lazy<T>::value() const
{
Assert(
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
inline DEAL_II_ALWAYS_INLINE T &Lazy<T>::value()
{
Assert(
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
template <typename Callable>
inline DEAL_II_ALWAYS_INLINE const T &Lazy<T>::value_or_initialize(
const Callable &creator) const
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
template <typename Callable>
inline DEAL_II_ALWAYS_INLINE T &Lazy<T>::value_or_initialize(
const Callable &creator)
template <typename T>
-DEAL_II_CXX20_REQUIRES((std::is_constructible_v<T, T> &&
- std::is_assignable_v<T &, T &&>))
+DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v<T> &&
+ std::is_move_assignable_v<T>))
std::size_t Lazy<T>::memory_consumption() const
{
return MemoryConsumption::memory_consumption(object) + //