Boost C++ Libraries: Ticket #5780: Boost.Fusion adapted class boost::rational<long> causes compile errors in Boost.Spirit.Karma rules https://svn.boost.org/trac10/ticket/5780 <p> The attached test case compiled and worked correctly until Boost 1.44 using BOOST_FUSION_ADAPT_CLASS to adapt boost::rational&lt;long&gt; to a Fusion sequence used in a Karma output rule. With Boost 1.45, BOOST_FUSION_ADAPT_CLASS has been replaced with BOOST_FUSION_ADAPT_ADT. According to Boost.Spirit documentation (cf. Karma - Writing Generators -&gt; Tutorials -&gt; Complex - Fully Integrated), the semantics haven't changed despite the name change: </p> <p> <a href="http://www.boost.org/doc/libs/1_47_0/libs/spirit/doc/html/spirit/karma/tutorials/karma_adapted_complex.html">http://www.boost.org/doc/libs/1_47_0/libs/spirit/doc/html/spirit/karma/tutorials/karma_adapted_complex.html</a> </p> <p> (The referred documentation page contains a small error, as it still mentions BOOST_FUSION_ADAPT_CLASS instead of BOOST_FUSION_ADAPT_ADT.) </p> <p> The test case causes with Boost 1.45 till Boost trunk compile errors. The compiler output log is attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5780 Trac 1.4.3 Torsten Maehne <Torsten.Maehne@…> Sat, 13 Aug 2011 14:01:46 GMT attachment set https://svn.boost.org/trac10/ticket/5780 https://svn.boost.org/trac10/ticket/5780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_boost_fusion_adaption_with_karma.cpp</span> </li> </ul> <p> Test case </p> Ticket Torsten Maehne <Torsten.Maehne@…> Sat, 13 Aug 2011 14:02:33 GMT attachment set https://svn.boost.org/trac10/ticket/5780 https://svn.boost.org/trac10/ticket/5780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_boost_fusion_adaption_with_karma.log</span> </li> </ul> <p> Compiler error log </p> Ticket Joel de Guzman Sat, 13 Aug 2011 23:05:24 GMT owner changed https://svn.boost.org/trac10/ticket/5780#comment:1 https://svn.boost.org/trac10/ticket/5780#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Joel de Guzman</span> to <span class="trac-author">Hartmut Kaiser</span> </li> </ul> Ticket Hartmut Kaiser Sun, 14 Aug 2011 03:46:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5780#comment:2 https://svn.boost.org/trac10/ticket/5780#comment:2 <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> Adding </p> <pre class="wiki"> #include &lt;boost/spirit/include/support_adapt_adt_attributes.hpp&gt; </pre><p> will make your test case compile fine (with SVN trunk and V1.47). </p> <p> Thanks for the doc bug report, I will fix it asap. </p> Ticket