mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
AK: Loosen the restrictions on non-copyable/non-movable containers
If a type is non-move constructible but move assignable, its container type may still be move assignable. Similairly, if a type is non-copy constructible but copy assignable, its container type may still be copy assignable.
This commit is contained in:
parent
2284e96392
commit
a9ac1322c6
1 changed files with 16 additions and 16 deletions
|
@ -26,14 +26,14 @@ public: \
|
|||
c(c const&) = default; \
|
||||
c& operator=(c const&) = default
|
||||
|
||||
#define AK_MAKE_CONDITIONALLY_NONMOVABLE(c, ...) \
|
||||
public: \
|
||||
c(c&&) \
|
||||
requires(!(AK::Detail::IsMoveConstructible __VA_ARGS__)) \
|
||||
= delete; \
|
||||
c& operator=(c&&) \
|
||||
requires(!(AK::Detail::IsMoveConstructible __VA_ARGS__) \
|
||||
|| !(AK::Detail::IsDestructible __VA_ARGS__)) \
|
||||
#define AK_MAKE_CONDITIONALLY_NONMOVABLE(c, ...) \
|
||||
public: \
|
||||
c(c&&) \
|
||||
requires(!(AK::Detail::IsMoveConstructible __VA_ARGS__)) \
|
||||
= delete; \
|
||||
c& operator=(c&&) \
|
||||
requires(!((AK::Detail::IsMoveConstructible __VA_ARGS__) || (AK::Detail::IsMoveAssignable __VA_ARGS__)) \
|
||||
|| !(AK::Detail::IsDestructible __VA_ARGS__)) \
|
||||
= delete
|
||||
|
||||
#define AK_MAKE_CONDITIONALLY_MOVABLE(c, T) \
|
||||
|
@ -41,14 +41,14 @@ public: \
|
|||
c(c&&) = default; \
|
||||
c& operator=(c&&) = default
|
||||
|
||||
#define AK_MAKE_CONDITIONALLY_NONCOPYABLE(c, ...) \
|
||||
public: \
|
||||
c(c const&) \
|
||||
requires(!(AK::Detail::IsCopyConstructible __VA_ARGS__)) \
|
||||
= delete; \
|
||||
c& operator=(c const&) \
|
||||
requires(!(AK::Detail::IsCopyConstructible __VA_ARGS__) \
|
||||
|| !(AK::Detail::IsDestructible __VA_ARGS__)) \
|
||||
#define AK_MAKE_CONDITIONALLY_NONCOPYABLE(c, ...) \
|
||||
public: \
|
||||
c(c const&) \
|
||||
requires(!(AK::Detail::IsCopyConstructible __VA_ARGS__)) \
|
||||
= delete; \
|
||||
c& operator=(c const&) \
|
||||
requires(!((AK::Detail::IsCopyConstructible __VA_ARGS__) || (AK::Detail::IsCopyAssignable __VA_ARGS__)) \
|
||||
|| !(AK::Detail::IsDestructible __VA_ARGS__)) \
|
||||
= delete
|
||||
|
||||
#define AK_MAKE_CONDITIONALLY_COPYABLE(c, ...) \
|
||||
|
|
Loading…
Add table
Reference in a new issue