Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slot_map : Fix gcc7 structured bindings warnings.
Gcc7 doesn't implement [[maybe_unused]] attribute for structured bindings. Disable unused-parameter checks on gcc7 (only). slot_map.h:48:91: error: unused variable ¿gen¿ [-Werror=unused-variable] static constexpr auto get_index(const Key& k) { [[maybe_unused]] const auto& [idx, gen] = k; return idx; } Also disable buggy unused-but-set-variable for gcc7 (only). error: variable ¿idx¿ set but not used [-Werror=unused-but-set-variable] template<class Integral> static constexpr void set_index(Key& k, Integral value) { auto&[idx, gen] = k; detail::maybe_unused(gen); idx = static_cast<key_size_type>(value); }
- Loading branch information