From 471631e8ee548405f7d323549a6e92cbc8c3d253 Mon Sep 17 00:00:00 2001 From: ivan0sokin Date: Thu, 1 May 2025 04:07:47 +0300 Subject: [PATCH] add constraints --- src/vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector.h b/src/vector.h index 9e837ee..12540a9 100644 --- a/src/vector.h +++ b/src/vector.h @@ -107,10 +107,10 @@ class Vector { ConstIterator end() const noexcept; // O(N) strong - Iterator insert(ConstIterator pos, const T& value); + Iterator insert(ConstIterator pos, const T& value) requires (std::is_copy_assignable_v); // O(N) strong if move nothrow - Iterator insert(ConstIterator pos, T&& value); + Iterator insert(ConstIterator pos, T&& value) requires (std::is_move_assignable_v); // O(N) nothrow(swap) Iterator erase(ConstIterator pos);