Implement N3421; comparison predicates<void>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187357 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__functional_base b/include/__functional_base
index 5b0d720..2bc2d2c 100644
--- a/include/__functional_base
+++ b/include/__functional_base
@@ -50,13 +50,27 @@
static const bool value = sizeof(__test<_Tp>(0)) == 1;
};
+#if _LIBCPP_STD_VER > 11
+template <class _Tp = void>
+#else
template <class _Tp>
+#endif
struct _LIBCPP_TYPE_VIS less : binary_function<_Tp, _Tp, bool>
{
_LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const
{return __x < __y;}
};
+#if _LIBCPP_STD_VER > 11
+template <>
+struct _LIBCPP_TYPE_VIS 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); }
+};
+#endif
+
#ifdef _LIBCPP_HAS_NO_VARIADICS
#include <__functional_base_03>