Remove detail::make_dependent in favor of an extra template parameter in is_transparetn

This commit is contained in:
LeonineKing1199
2021-11-22 13:29:41 -08:00
parent 937c3484cf
commit 8ba710637a
2 changed files with 10 additions and 13 deletions

View File

@ -726,16 +726,15 @@ namespace boost {
////////////////////////////////////////////////////////////////////////////
// Type checkers used for the transparent member functions added by C++20 and up
template <class>
struct make_dependent : public true_type {};
template <class, class = void> struct is_transparent : public false_type
template <class, class, class = void>
struct is_transparent : public false_type
{
};
template <class T>
struct is_transparent<T,
typename boost::make_void<typename T::is_transparent>::type> : public true_type
template <class X, class T>
struct is_transparent<X, T,
typename boost::make_void<typename T::is_transparent>::type>
: public true_type
{
};

View File

@ -758,9 +758,8 @@ namespace boost {
size_type count(const key_type&) const;
template <class Key>
typename boost::enable_if_c<detail::make_dependent<Key>::value &&
detail::is_transparent<H>::value &&
detail::is_transparent<P>::value,
typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<Key, P>::value,
size_type>::type
count(const Key&) const;
@ -1846,9 +1845,8 @@ namespace boost {
template <class K, class T, class H, class P, class A>
template <class Key>
typename boost::enable_if_c<detail::make_dependent<Key>::value &&
detail::is_transparent<H>::value &&
detail::is_transparent<P>::value,
typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<Key, P>::value,
typename unordered_map<K, T, H, P, A>::size_type>::type
unordered_map<K, T, H, P, A>::count(const Key& k) const
{