[ox/std] Make Vector::remove take a MaybeView_t
All checks were successful
Build / build (push) Successful in 1m17s

This commit is contained in:
Gary Talent 2025-05-24 00:46:39 -05:00
parent c4c1d4777b
commit 26f1a6051f

View File

@ -311,7 +311,7 @@ class Vector: detail::VectorAllocator<T, Allocator, SmallVectorSize> {
*/
constexpr Error unordered_erase(std::size_t pos) noexcept(useNoexcept);
constexpr Error remove(T const &val);
constexpr Error remove(MaybeView_t<T> const &val);
constexpr void reserve(std::size_t cap) noexcept(useNoexcept);
@ -662,7 +662,7 @@ constexpr Error Vector<T, SmallVectorSize, Allocator>::unordered_erase(std::size
}
template<typename T, std::size_t SmallVectorSize, typename Allocator>
constexpr ox::Error Vector<T, SmallVectorSize, Allocator>::remove(T const &val) {
constexpr ox::Error Vector<T, SmallVectorSize, Allocator>::remove(MaybeView_t<T> const &val) {
for (size_t i{}; auto const &v : *this) {
if (v == val) {
return erase(i).error;