Boost C++ Libraries: Ticket #11380: Container library std forward declarations incorrect in std_fwd.hpp on libc++ with gcc https://svn.boost.org/trac10/ticket/11380 <p> std_fwd.hpp contains code to detect libc++ and try to forward declare some types there appropriately. However, the ifdef logic assumes that libc++ is only ever used on Clang, which is incorrect. It is possible to use libc++ with GCC, for example on Android where you generally choose the compiler and C++ library separately. </p> <p> Currently, "#if defined(<span class="underline">clang</span>) &amp;&amp; defined(_LIBCPP_VERSION)" is used to trigger libc++-specific style of forward declarations. Only _LIBCPP_VERSION should be checked, with a secondary <span class="underline">clang</span> check to disable a warning. </p> <p> As a side note, shouldn't there be a build-time setting to disable this std:: forwarding altogether? It feels fragile, and borderline UB. It sacrifices portability for some potential build speed improvement, which might not be the best choice for everyone. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11380 Trac 1.4.3 tsniatowski@… Mon, 08 Jun 2015 06:39:38 GMT attachment set https://svn.boost.org/trac10/ticket/11380 https://svn.boost.org/trac10/ticket/11380 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">std_fwd_libc++_gcc.patch</span> </li> </ul> Ticket Ion Gaztañaga Tue, 09 Jun 2015 20:55:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11380#comment:1 https://svn.boost.org/trac10/ticket/11380#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the patch. Merged to master. </p> Ticket