[libcxx] r276556 - Add __is_inplace_type metafunction helper
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 24 00:42:14 PDT 2016
Author: ericwf
Date: Sun Jul 24 02:42:13 2016
New Revision: 276556
URL: http://llvm.org/viewvc/llvm-project?rev=276556&view=rev
Log:
Add __is_inplace_type metafunction helper
Modified:
libcxx/trunk/include/utility
Modified: libcxx/trunk/include/utility
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/utility?rev=276556&r1=276555&r2=276556&view=diff
==============================================================================
--- libcxx/trunk/include/utility (original)
+++ libcxx/trunk/include/utility Sun Jul 24 02:42:13 2016
@@ -849,6 +849,11 @@ inline in_place_tag in_place(__in_place_
return in_place_tag(__in_place_tag{});
}
+template <class _Tp> struct __is_inplace_type : false_type {};
+template <> struct __is_inplace_type<in_place_t> : true_type {};
+template <class _Tp> struct __is_inplace_type<in_place_type_t<_Tp>> : true_type {};
+template <size_t _Idx> struct __is_inplace_type<in_place_index_t<_Idx>> : true_type {};
+
#endif // _LIBCPP_STD_VER > 14
_LIBCPP_END_NAMESPACE_STD
More information about the cfe-commits
mailing list