<div dir="ltr">Just add a bullet to the list of MSVC standard library things that we should avoid?</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 12:01 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We'd like to keep the clang-cl self-host working until we implement<br>
MSVC-compatible RTTI.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2930" target="_blank">http://llvm-reviews.chandlerc.com/D2930</a><br>
<br>
Files:<br>
  docs/CodingStandards.rst<br>
<br>
Index: docs/CodingStandards.rst<br>
===================================================================<br>
--- docs/CodingStandards.rst<br>
+++ docs/CodingStandards.rst<br>
@@ -753,6 +753,17 @@<br>
   // Remove the reference if you really want a new copy.<br>
   for (auto Val : Container) { Val.change(); saveSomewhere(Val); }<br>
<br>
+Do not use std::function<br>
+^^^^^^^^^^^^^^^^^^^^^^^^<br>
+<br>
+Using ``std::function`` breaks self-hosting Clang on Windows with the Microsoft<br>
+Visual C++ STL.  MSVC's implementation of ``std::function`` requires RTTI, and<br>
+Clang does not implement `MSVC-compatible RTTI`_ yet.  Generally, any local use<br>
+of ``std::function`` can be replaced with ``auto``.  For code that truly needs<br>
+an opaque function, use something else for the meantime.<br>
+<br>
+.. _MSVC-style RTTI: <a href="http://llvm.org/PR18951" target="_blank">http://llvm.org/PR18951</a><br>
+<br>
 Style Issues<br>
 ============<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>