Unused variable warning (issue #208) and remove c++17 dependency.

This commit is contained in:
greg7mdp
2023-09-29 10:36:21 -04:00
parent 81ca453769
commit a7909d547c
2 changed files with 28 additions and 26 deletions
+4 -4
View File
@@ -1271,8 +1271,8 @@ public:
if (empty())
return;
if (capacity_) {
if constexpr (!std::is_trivially_destructible<typename PolicyTraits::value_type>::value ||
std::is_same<typename Policy::is_flat, std::false_type>::value) {
PHMAP_IF_CONSTEXPR((!std::is_trivially_destructible<typename PolicyTraits::value_type>::value ||
std::is_same<typename Policy::is_flat, std::false_type>::value)) {
// node map or not trivially destructible... we need to iterate and destroy values one by one
for (size_t i = 0; i != capacity_; ++i) {
if (IsFull(ctrl_[i])) {
@@ -2009,8 +2009,8 @@ private:
if (!capacity_)
return;
if constexpr (!std::is_trivially_destructible<typename PolicyTraits::value_type>::value ||
std::is_same<typename Policy::is_flat, std::false_type>::value) {
PHMAP_IF_CONSTEXPR((!std::is_trivially_destructible<typename PolicyTraits::value_type>::value ||
std::is_same<typename Policy::is_flat, std::false_type>::value)) {
// node map, or not trivially destructible... we need to iterate and destroy values one by one
// std::cout << "either this is a node map or " << type_name<typename PolicyTraits::value_type>() << " is not trivially_destructible\n";
for (size_t i = 0; i != capacity_; ++i) {