Browse Source

static_vector.hpp: Use `std::destroy_n` in the destructor (#8030)

A bit less code now that we're C++17 everywhere.
pull/7974/merge
Gleb Mazovetskiy 9 months ago committed by GitHub
parent
commit
6d307fbcab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      Source/utils/static_vector.hpp

4
Source/utils/static_vector.hpp

@ -103,9 +103,7 @@ public:
~StaticVector()
{
for (std::size_t pos = 0; pos < size_; ++pos) {
std::destroy_at(data_[pos].ptr());
}
std::destroy_n(data(), size_);
}
private:

Loading…
Cancel
Save