summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__functional_base
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2013-08-13 01:11:06 +0000
committerMarshall Clow <mclow.lists@gmail.com>2013-08-13 01:11:06 +0000
commit25d3402c6a595cdf5555a82de0eee8d8a58df25a (patch)
treead70a64b9844d4991098591286de6b47a3f84a11 /libcxx/include/__functional_base
parentf09a3dbf92b0f9b0c041a80f862147b03237ce1e (diff)
downloadbcm5719-llvm-25d3402c6a595cdf5555a82de0eee8d8a58df25a.tar.gz
bcm5719-llvm-25d3402c6a595cdf5555a82de0eee8d8a58df25a.zip
First half of support for N3657; heterogenous lookups for set/multiset
llvm-svn: 188241
Diffstat (limited to 'libcxx/include/__functional_base')
-rw-r--r--libcxx/include/__functional_base15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base
index 8ecc35b75da..72da75971b9 100644
--- a/libcxx/include/__functional_base
+++ b/libcxx/include/__functional_base
@@ -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
OpenPOWER on IntegriCloud