From 8ba710637a2f83046c40d742c9c430d9827604cd Mon Sep 17 00:00:00 2001 From: LeonineKing1199 Date: Mon, 22 Nov 2021 13:29:41 -0800 Subject: [PATCH] Remove `detail::make_dependent` in favor of an extra template parameter in `is_transparetn` --- include/boost/unordered/detail/implementation.hpp | 13 ++++++------- include/boost/unordered/unordered_map.hpp | 10 ++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 7c9150ba..b084bbc0 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -726,16 +726,15 @@ namespace boost { //////////////////////////////////////////////////////////////////////////// // Type checkers used for the transparent member functions added by C++20 and up - template - struct make_dependent : public true_type {}; - - template struct is_transparent : public false_type + template + struct is_transparent : public false_type { }; - template - struct is_transparent::type> : public true_type + template + struct is_transparent::type> + : public true_type { }; diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 7e6dd467..261fc943 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -758,9 +758,8 @@ namespace boost { size_type count(const key_type&) const; template - typename boost::enable_if_c::value && - detail::is_transparent::value && - detail::is_transparent

::value, + typename boost::enable_if_c::value && + detail::is_transparent::value, size_type>::type count(const Key&) const; @@ -1846,9 +1845,8 @@ namespace boost { template template - typename boost::enable_if_c::value && - detail::is_transparent::value && - detail::is_transparent

::value, + typename boost::enable_if_c::value && + detail::is_transparent::value, typename unordered_map::size_type>::type unordered_map::count(const Key& k) const {