diff --git a/BAN/include/BAN/LinkedList.h b/BAN/include/BAN/LinkedList.h index 319a685c..626b7dbe 100644 --- a/BAN/include/BAN/LinkedList.h +++ b/BAN/include/BAN/LinkedList.h @@ -21,11 +21,11 @@ namespace BAN public: LinkedList() = default; - LinkedList(const LinkedList& other) { *this = other; } + LinkedList(const LinkedList& other) requires is_copy_constructible_v { *this = other; } LinkedList(LinkedList&& other) { *this = move(other); } ~LinkedList() { clear(); } - LinkedList& operator=(const LinkedList&); + LinkedList& operator=(const LinkedList&) requires is_copy_constructible_v; LinkedList& operator=(LinkedList&&); ErrorOr push_back(const T&); @@ -115,7 +115,7 @@ namespace BAN }; template - LinkedList& LinkedList::operator=(const LinkedList& other) + LinkedList& LinkedList::operator=(const LinkedList& other) requires is_copy_constructible_v { clear(); for (const T& elem : other)