mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09: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
eff9d4881c
commit
50bc6fb9d9
Notes:
github-actions[bot]
2025-04-23 03:20:44 +00:00
Author: https://github.com/yyny
Commit: 50bc6fb9d9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4310
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/DanShaders
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard ✅
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
Add a link
Reference in a new issue