Skip to content

Commit

Permalink
Update small_vector.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Sep 15, 2024
1 parent 582d2e1 commit 14812ec
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utility/small_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ namespace gapp::detail
constexpr void construct_range(A& allocator, T* first, T* last)
noexcept(std::is_nothrow_default_constructible_v<T> && has_trivial_construct_v<A&, T>)
{
if constexpr (std::is_trivially_default_constructible_v<T> && has_trivial_construct_v<A&, T>)
{
if (!std::is_constant_evaluated())
{
std::fill((char*)first, (char*)last, 0);
return;
}
}
//if constexpr (std::is_trivially_default_constructible_v<T> && has_trivial_construct_v<A&, T>)
//{
// if (!std::is_constant_evaluated())
// {
// std::fill((char*)first, (char*)last, 0);
// return;
// }
//}

T* next = first;
scope_exit guard{ [&] { detail::destroy_range(allocator, first, next); } };
Expand Down

0 comments on commit 14812ec

Please sign in to comment.