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 // Type checkers used for the transparent member functions added by C++20 and up
template <class> template <class, class, class = void>
struct make_dependent : public true_type {}; struct is_transparent : public false_type
template <class, class = void> struct is_transparent : public false_type
{ {
}; };
template <class T> template <class X, class T>
struct is_transparent<T, struct is_transparent<X, T,
typename boost::make_void<typename T::is_transparent>::type> : public true_type 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; size_type count(const key_type&) const;
template <class Key> template <class Key>
typename boost::enable_if_c<detail::make_dependent<Key>::value && typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<H>::value && detail::is_transparent<Key, P>::value,
detail::is_transparent<P>::value,
size_type>::type size_type>::type
count(const Key&) const; count(const Key&) const;
@ -1846,9 +1845,8 @@ namespace boost {
template <class K, class T, class H, class P, class A> template <class K, class T, class H, class P, class A>
template <class Key> template <class Key>
typename boost::enable_if_c<detail::make_dependent<Key>::value && typename boost::enable_if_c<detail::is_transparent<Key, H>::value &&
detail::is_transparent<H>::value && detail::is_transparent<Key, P>::value,
detail::is_transparent<P>::value,
typename unordered_map<K, T, H, P, A>::size_type>::type typename unordered_map<K, T, H, P, A>::size_type>::type
unordered_map<K, T, H, P, A>::count(const Key& k) const unordered_map<K, T, H, P, A>::count(const Key& k) const
{ {