diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 8661e408..e1cfc2e7 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -701,18 +701,23 @@ namespace boost { //////////////////////////////////////////////////////////////////////////// // Type checkers used for the transparent member functions added by C++20 and up - template - struct is_transparent : public false_type + template struct is_transparent : public false_type { }; - template - struct is_transparent + struct is_transparent::type> : public true_type { }; + template struct are_transparent + { + static bool const value = + is_transparent::value && is_transparent::value; + }; + //////////////////////////////////////////////////////////////////////////// // Explicitly call a destructor diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index f44b8e71..c9fd46d2 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -432,8 +432,7 @@ namespace boost { template typename boost::enable_if_c< - detail::is_transparent::value && - detail::is_transparent::value && + detail::are_transparent::value && !boost::is_convertible::value && !boost::is_convertible::value, node_type>::type @@ -725,8 +724,7 @@ namespace boost { template typename boost::enable_if_c< - detail::is_transparent::value && - detail::is_transparent::value && + detail::are_transparent::value && !boost::is_convertible::value && !boost::is_convertible::value, size_type>::type @@ -774,8 +772,7 @@ namespace boost { const_iterator find(const key_type&) const; template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, iterator>::type find(const Key& key) { @@ -785,8 +782,7 @@ namespace boost { } template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, const_iterator>::type find(const Key& key) const { @@ -808,8 +804,7 @@ namespace boost { size_type count(const key_type&) const; template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, size_type>::type count(const Key& k) const { @@ -828,8 +823,7 @@ namespace boost { const key_type&) const; template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, std::pair >::type equal_range(const Key& key) { @@ -842,8 +836,7 @@ namespace boost { } template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, std::pair >::type equal_range(const Key& key) const { @@ -1449,8 +1442,7 @@ namespace boost { const_iterator find(const key_type&) const; template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, iterator>::type find(const Key& key) { @@ -1460,8 +1452,7 @@ namespace boost { } template - typename boost::enable_if_c::value && - detail::is_transparent::value, + typename boost::enable_if_c::value, const_iterator>::type find(const Key& key) const {