QFlatMap: fix a declval usage

The comparator object is allowed to reject rvalues. Use a const
lvalue ref.

Change-Id: Id4ab5e094f3a0f4e6b2549ee5d3105d93faf1d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Giuseppe D'Angelo 2022-11-03 21:44:41 +01:00
parent ffb44ad8ef
commit 2ec77f4f11
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public:
using value_type = std::pair<const Key, T>;
static constexpr bool is_comparator_noexcept = noexcept(
std::declval<Compare>()(std::declval<Key>(), std::declval<Key>()));
std::declval<Compare>()(std::declval<const Key &>(), std::declval<const Key &>()));
bool operator()(const value_type &lhs, const value_type &rhs) const
noexcept(is_comparator_noexcept)