| 213 | /// @see Algorithms::removeIf |
| 214 | template <typename Lambda> |
| 215 | [[nodiscard]] bool removeAll(Lambda&& criteria) noexcept |
| 216 | { |
| 217 | T* itBeg = Parent::begin(); |
| 218 | T* itEnd = Parent::end(); |
| 219 | T* it = Algorithms::removeIf(itBeg, itEnd, forward<Lambda>(criteria)); |
| 220 | |
| 221 | const size_t numElements = static_cast<size_t>(itEnd - it); |
| 222 | const size_t offset = static_cast<size_t>(it - itBeg); |
| 223 | detail::VectorVTable<T>::destruct({Parent::data() + offset, numElements}); |
| 224 | Parent::header.sizeBytes -= static_cast<decltype(Parent::header.sizeBytes)>(numElements * sizeof(T)); |
| 225 | return it != itEnd; |
| 226 | } |
| 227 | |
| 228 | /// @brief Removes all values equal to `value` |
| 229 | /// @tparam U Type of the Value |