Skip to content

Commit

Permalink
if constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
liss-h committed Dec 6, 2024
1 parent 2df38f2 commit b23c0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dice/sparse-map/sparse_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ class sparse_hash : private Allocator,
void swap(sparse_hash &other) {
using std::swap;

if (std::allocator_traits<Allocator>::propagate_on_container_swap::value) {
if constexpr (std::allocator_traits<Allocator>::propagate_on_container_swap::value) {
swap(static_cast<Allocator &>(*this), static_cast<Allocator &>(other));
} else {
tsl_sh_assert(static_cast<Allocator &>(*this) ==
Expand Down

0 comments on commit b23c0da

Please sign in to comment.