Add missing _v traits. is_bind_expression_v, is_placeholder_v and uses_allocator_v

llvm-svn: 282126
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: a48055cee3b95e92343fadca912b0ad5d11aa966
diff --git a/include/__functional_base b/include/__functional_base
index 1a08ea2..82b4146 100644
--- a/include/__functional_base
+++ b/include/__functional_base
@@ -625,6 +625,11 @@
 {
 };
 
+#if _LIBCPP_STD_VER > 14
+template <class _Tp, class _Alloc>
+constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
+#endif
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
 // allocator construction
diff --git a/include/functional b/include/functional
index d0b65b2..aec6092 100644
--- a/include/functional
+++ b/include/functional
@@ -212,6 +212,13 @@
 template<class T> struct is_bind_expression;
 template<class T> struct is_placeholder;
 
+    // See C++14 20.9.9, Function object binders
+template <class T> constexpr bool is_bind_expression_v
+  = is_bind_expression<T>::value; // C++17
+template <class T> constexpr int is_placeholder_v
+  = is_placeholder<T>::value; // C++17
+
+
 template<class Fn, class... BoundArgs>
   unspecified bind(Fn&&, BoundArgs&&...);
 template<class R, class Fn, class... BoundArgs>
@@ -1970,10 +1977,20 @@
 template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_bind_expression
     : public __is_bind_expression<typename remove_cv<_Tp>::type> {};
 
+#if _LIBCPP_STD_VER > 14
+template <class _Tp>
+constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
+#endif
+
 template<class _Tp> struct __is_placeholder : public integral_constant<int, 0> {};
 template<class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_placeholder
     : public __is_placeholder<typename remove_cv<_Tp>::type> {};
 
+#if _LIBCPP_STD_VER > 14
+template <class _Tp>
+constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value;
+#endif
+
 namespace placeholders
 {