First half of support for N3657; heterogenous lookups for set/multiset

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2013-08-13 01:11:06 +00:00
parent 0f678bd69e
commit 4a0a98166c
12 changed files with 902 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ struct _LIBCPP_TYPE_VIS_ONLY less<void>
template <class _T1, class _T2> _LIBCPP_INLINE_VISIBILITY
auto operator()(_T1&& __t, _T2&& __u) const
{ return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
typedef void is_transparent;
};
#endif
@@ -501,6 +502,20 @@ template <class _Tp> void cref(const _Tp&&);// = delete;
#endif // _LIBCPP_HAS_NO_VARIADICS
#if _LIBCPP_STD_VER > 11
template <class _Tp1, class _Tp2 = void>
struct __is_transparent
{
private:
struct __two {char __lx; char __lxx;};
template <class _Up> static __two __test(...);
template <class _Up> static char __test(typename _Up::is_transparent* = 0);
public:
static const bool value = sizeof(__test<_Tp1>(0)) == 1;
};
#endif
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_FUNCTIONAL_BASE