[patch] libcxx type_traits for msvc

G M gmisocpp at gmail.com
Mon Jan 6 04:23:56 PST 2014

HI Everyone

This patch hopefully makes type_traits compile for MSVC by enabling the
is_polymorphic function which I think the latest MSVC supports.

This patch fixes a number of compiler errors for libcxx and it is also
required by my test case for clz/l/ll and ctz/l/ll functions in order to
work, which I have updated to reflect marshall's suggestions. I shall
submit that too shortly if this patch is accepted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140107/26b7c60f/attachment.html>
-------------- next part --------------
Index: type_traits
--- type_traits	(revision 198593)
+++ type_traits	(working copy)
@@ -946,7 +946,7 @@
 // is_polymorphic
-#if __has_feature(is_polymorphic)
+#if __has_feature(is_polymorphic) || defined(_LIBCPP_MSVC)
 template <class _Tp>
 struct _LIBCPP_TYPE_VIS_ONLY is_polymorphic

More information about the cfe-commits mailing list