Fix two warning related to upcoming c++17 deprecations

This commit is contained in:
Brian McKinnon
2020-05-03 12:03:55 -05:00
parent a1349d2b65
commit 76da9dca62
2 changed files with 10 additions and 6 deletions
+4 -4
View File
@@ -712,7 +712,7 @@ namespace phmap {
template <
typename Compare, typename K, typename LK,
phmap::enable_if_t<!std::is_same<bool, phmap::result_of_t<
phmap::enable_if_t<!std::is_same<bool, phmap::invoke_result_t<
Compare(const K &, const LK &)>>::value,
int> = 0>
constexpr phmap::weak_ordering do_three_way_comparison(const Compare &compare,
@@ -721,7 +721,7 @@ namespace phmap {
}
template <
typename Compare, typename K, typename LK,
phmap::enable_if_t<std::is_same<bool, phmap::result_of_t<Compare(
phmap::enable_if_t<std::is_same<bool, phmap::invoke_result_t<Compare(
const K &, const LK &)>>::value,
int> = 0>
constexpr phmap::weak_ordering do_three_way_comparison(const Compare &compare,
@@ -743,7 +743,7 @@ namespace container_internal {
// comparator.
template <typename Compare, typename T>
using btree_is_key_compare_to =
std::is_convertible<phmap::result_of_t<Compare(const T &, const T &)>,
std::is_convertible<phmap::invoke_result_t<Compare, const T &, const T &>,
phmap::weak_ordering>;
struct StringBtreeDefaultLess {
@@ -2507,7 +2507,7 @@ namespace container_internal {
// Verify that key_compare returns an phmap::{weak,strong}_ordering or bool.
using compare_result_type =
phmap::result_of_t<key_compare(key_type, key_type)>;
phmap::invoke_result_t<key_compare, key_type, key_type>;
static_assert(
std::is_same<compare_result_type, bool>::value ||
std::is_convertible<compare_result_type, phmap::weak_ordering>::value,