| 91 | /// @see Algorithms::removeIf |
| 92 | template <typename Lambda> |
| 93 | [[nodiscard]] bool removeAll(Lambda&& criteria) |
| 94 | { |
| 95 | T* itBeg = Parent::begin(); |
| 96 | T* itEnd = Parent::end(); |
| 97 | T* it = Algorithms::removeIf(itBeg, itEnd, forward<Lambda>(criteria)); |
| 98 | |
| 99 | const size_t numBytes = static_cast<size_t>(itEnd - it) * sizeof(T); |
| 100 | const size_t offBytes = static_cast<size_t>(it - itBeg) * sizeof(T); |
| 101 | detail::VectorVTable<T>::destruct(Parent::getData(), offBytes, numBytes); |
| 102 | Parent::header.sizeBytes -= static_cast<decltype(Parent::header.sizeBytes)>(numBytes); |
| 103 | return it != itEnd; |
| 104 | } |
| 105 | |
| 106 | /// @brief Removes all values equal to `value` |
| 107 | /// @see Algorithms::removeIf |