mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
Fix two warning related to upcoming c++17 deprecations
This commit is contained in:
Vendored
+4
-4
@@ -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,
|
||||
|
||||
Vendored
+6
-2
@@ -328,8 +328,12 @@ using common_type_t = typename std::common_type<T...>::type;
|
||||
template <typename T>
|
||||
using underlying_type_t = typename std::underlying_type<T>::type;
|
||||
|
||||
template <typename T>
|
||||
using result_of_t = typename std::result_of<T>::type;
|
||||
template< class F, class... ArgTypes>
|
||||
#if __cplusplus >= 201703L
|
||||
using invoke_result_t = typename std::invoke_result_t<F, ArgTypes...>;
|
||||
#else
|
||||
using invoke_result_t = typename std::result_of<F(ArgTypes...)>::type;
|
||||
#endif
|
||||
|
||||
namespace type_traits_internal {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user