Opened 11 years ago
Closed 11 years ago
#5780 closed Bugs (fixed)
Boost.Fusion adapted class boost::rational<long> causes compile errors in Boost.Spirit.Karma rules
Reported by: | Owned by: | Hartmut Kaiser | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | BOOST_FUSION_ADAPT_CLASS, BOOST_FUSION_ADAPT_ADT | Cc: |
Description
The attached test case compiled and worked correctly until Boost 1.44 using BOOST_FUSION_ADAPT_CLASS to adapt boost::rational<long> 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 -> Tutorials -> Complex - Fully Integrated), the semantics haven't changed despite the name change:
(The referred documentation page contains a small error, as it still mentions BOOST_FUSION_ADAPT_CLASS instead of BOOST_FUSION_ADAPT_ADT.)
The test case causes with Boost 1.45 till Boost trunk compile errors. The compiler output log is attached.
Attachments (2)
Change History (4)
by , 11 years ago
Attachment: | test_boost_fusion_adaption_with_karma.cpp added |
---|
comment:1 by , 11 years ago
Owner: | changed from | to
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Adding
#include <boost/spirit/include/support_adapt_adt_attributes.hpp>
will make your test case compile fine (with SVN trunk and V1.47).
Thanks for the doc bug report, I will fix it asap.
Test case