<div dir="ltr">I seem to recall someone suggesting that we move away from using __has_feature for these checks.<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 1:36 PM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note: Clang already implements “__is_constructible” - this just makes it checkable.<br>
With this check I can use it in libc++.<br>
<br>
— Marshall<br>
<br>
<br>
Index: lib/Lex/PPMacroExpansion.cpp<br>
===================================================================<br>
--- lib/Lex/PPMacroExpansion.cpp (revision 204039)<br>
+++ lib/Lex/PPMacroExpansion.cpp (working copy)<br>
@@ -989,6 +989,7 @@<br>
.Case("is_sealed", LangOpts.MicrosoftExt)<br>
.Case("is_trivial", LangOpts.CPlusPlus)<br>
.Case("is_trivially_assignable", LangOpts.CPlusPlus)<br>
+ .Case("is_constructible", LangOpts.CPlusPlus)<br>
.Case("is_trivially_constructible", LangOpts.CPlusPlus)<br>
.Case("is_trivially_copyable", LangOpts.CPlusPlus)<br>
.Case("is_union", LangOpts.CPlusPlus)<br>
Index: test/Lexer/has_feature_type_traits.cpp<br>
===================================================================<br>
--- test/Lexer/has_feature_type_traits.cpp (revision 204039)<br>
+++ test/Lexer/has_feature_type_traits.cpp (working copy)<br>
@@ -100,6 +100,11 @@<br>
#endif<br>
// CHECK: int is_standard_layout();<br>
<br>
+#if __has_feature(is_constructible)<br>
+int is_constructible();<br>
+#endif<br>
+// CHECK: int is_constructible();<br>
+<br>
#if __has_feature(is_trivially_copyable)<br>
int is_trivially_copyable();<br>
#endif<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>