Boost C++ Libraries: Ticket #7539: including spirit multi_pass and info header files caused compile error https://svn.boost.org/trac10/ticket/7539 <p> It seems the 2 header files </p> <ul><li><code>boost/spirit/include/support_info.hpp</code> </li><li><code>boost/spirit/include/support_multi_pass.hpp</code> </li></ul><p> are not getting along very well using clang and its libc++ under c++11 </p> <p> If the 2 files are included in the same complie unit (either directly or indirectly) like following: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/spirit/include/support_info.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/spirit/include/support_multi_pass.hpp&gt;</span><span class="cp"></span> </pre></div></div><p> It will fail the clang with flag '-std=c++11', '-stdlib=libc++' </p> <pre class="wiki">clang++ -o test.o -c -std=c++11 -stdlib=libc++ -I/Users/qiang/Projects/boost_1_51_0 test.cpp In file included from test.cpp:1: In file included from /Users/qiang/Projects/boost_1_51_0/boost/spirit/include/support_info.hpp:15: In file included from /Users/qiang/Projects/boost_1_51_0/boost/spirit/home/support/info.hpp:19: /usr/bin/../lib/c++/v1/list:212:9: error: field has incomplete type 'boost::spirit::info' _Tp __value_; ^ /usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of template class 'std::__1::__list_node&lt;boost::spirit::info, void *&gt;' requested here decltype(_VSTD::move(_Tp(_VSTD::declval&lt;_Args&gt;()...)), true_type()) ^ ... </pre><p> Attachment is the complete error message. </p> <p> Reproduced in </p> <ul><li>Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn) </li><li>Target: x86_64-apple-darwin12.2.0 </li><li>With C++ 11 turn on: <strong>"-std=c++11 -stdlib=libc++" , the 2 flags must be turned on at the same time to reproduce this bug</strong> </li><li>Boost 1.51 and Boost Trunk rev.81030 </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7539 Trac 1.4.3 zhuo.qiang@… Sun, 21 Oct 2012 03:57:11 GMT attachment set https://svn.boost.org/trac10/ticket/7539 https://svn.boost.org/trac10/ticket/7539 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">compile_error_message.txt</span> </li> </ul> <p> The full compile error message </p> Ticket Fedor Sergeev <Fedor.Sergeev@…> Sun, 01 Mar 2015 19:29:57 GMT <link>https://svn.boost.org/trac10/ticket/7539#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7539#comment:1</guid> <description> <p> I'm getting the same failure with Oracle Solaris Studio C++ 12.4 compiler. Works fine for -std=c++03 and fails with 'incomplete type "boost::spirit::info"' for -std=c++11. </p> </description> <category>Ticket</category> </item> <item> <author>Fedor Sergeev <Fedor.Sergeev@…></author> <pubDate>Sun, 01 Mar 2015 21:36:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7539#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7539#comment:2</guid> <description> <p> At least for Studio C++ it looks like a bug in compiler when handling <code> alignment_of&lt;recursive_wrapper&lt;incomplete_type&gt;&gt; </code> where implementation of alignment_of goes through the alignment_of_hack path. </p> <p> Workaround found: <code> -DBOOST_ALIGNMENT_OF=__alignof </code> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sun, 14 Mar 2021 19:49:28 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7539#comment:3 https://svn.boost.org/trac10/ticket/7539#comment:3 <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">worksforme</span> </li> </ul> <p> could not reproduce with boost-1.51 and clang 3.4, probably a fixed bug in libc++ </p> Ticket