diff --git a/src/Collections/List.hpp b/src/Collections/List.hpp index 20bb22d..5e70d63 100644 --- a/src/Collections/List.hpp +++ b/src/Collections/List.hpp @@ -52,7 +52,9 @@ namespace Arbutils::Collections { throw std::logic_error(ss.str()); } #endif + auto prev = _vector.at(index); _vector[index] = value; + return prev; } inline bool Contains(const ValueT& value) const {