From 00e023483e7a4686b4160b8460355c05e8fcf844 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 27 Nov 2023 21:08:40 -0700 Subject: [PATCH] Refine a 'requires' clause. --- include/deal.II/base/lazy.h | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/include/deal.II/base/lazy.h b/include/deal.II/base/lazy.h index a26dea1d62..dbc01eeed9 100644 --- a/include/deal.II/base/lazy.h +++ b/include/deal.II/base/lazy.h @@ -77,12 +77,12 @@ DEAL_II_NAMESPACE_OPEN * }; * ``` * - * @dealiiConceptRequires{std::is_constructible_v && - std::is_assignable_v} + * @dealiiConceptRequires{std::is_move_constructible_v && + std::is_move_assignable_v} */ template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) class Lazy { public: @@ -246,16 +246,16 @@ private: template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline Lazy::Lazy() : object_is_initialized(false) {} template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline Lazy::Lazy(const Lazy &other) : object(other.object) { @@ -264,8 +264,8 @@ inline Lazy::Lazy(const Lazy &other) template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline Lazy::Lazy(Lazy &&other) noexcept : object(other.object) { @@ -274,8 +274,8 @@ inline Lazy::Lazy(Lazy &&other) noexcept template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline Lazy &Lazy::operator=(const Lazy &other) { object = other.object; @@ -285,8 +285,8 @@ inline Lazy &Lazy::operator=(const Lazy &other) template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline Lazy &Lazy::operator=(Lazy &&other) noexcept { object = other.object; @@ -296,8 +296,8 @@ inline Lazy &Lazy::operator=(Lazy &&other) noexcept template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline void Lazy::reset() noexcept { object_is_initialized.store(false); @@ -306,8 +306,8 @@ inline void Lazy::reset() noexcept template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) template inline DEAL_II_ALWAYS_INLINE void Lazy::ensure_initialized(const Callable &creator) const @@ -370,8 +370,8 @@ inline DEAL_II_ALWAYS_INLINE template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline DEAL_II_ALWAYS_INLINE bool Lazy::has_value() const { // @@ -385,8 +385,8 @@ inline DEAL_II_ALWAYS_INLINE bool Lazy::has_value() const template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline DEAL_II_ALWAYS_INLINE const T &Lazy::value() const { Assert( @@ -400,8 +400,8 @@ inline DEAL_II_ALWAYS_INLINE const T &Lazy::value() const template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) inline DEAL_II_ALWAYS_INLINE T &Lazy::value() { Assert( @@ -415,8 +415,8 @@ inline DEAL_II_ALWAYS_INLINE T &Lazy::value() template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) template inline DEAL_II_ALWAYS_INLINE const T &Lazy::value_or_initialize( const Callable &creator) const @@ -428,8 +428,8 @@ inline DEAL_II_ALWAYS_INLINE const T &Lazy::value_or_initialize( template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) template inline DEAL_II_ALWAYS_INLINE T &Lazy::value_or_initialize( const Callable &creator) @@ -441,8 +441,8 @@ inline DEAL_II_ALWAYS_INLINE T &Lazy::value_or_initialize( template -DEAL_II_CXX20_REQUIRES((std::is_constructible_v && - std::is_assignable_v)) +DEAL_II_CXX20_REQUIRES((std::is_move_constructible_v && + std::is_move_assignable_v)) std::size_t Lazy::memory_consumption() const { return MemoryConsumption::memory_consumption(object) + // -- 2.39.5