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
parent
ffb44ad8ef
commit
2ec77f4f11
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue