Opened 7 years ago
Closed 5 years ago
#11493 closed Bugs (fixed)
Cannot compile qi::keyword directive test in c++11/14 modes.
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Cannot compile keyword.cpp test from Boost.Spirit Repository directory. Lot of errors looks like:
boost/fusion/view/transform_view/detail/value_of_impl.hpp:37:74: error: no type named 'type' in 'boost::mpl::apply<boost::fusion::detail::apply_transform_result<boost::spirit::repository::qi::detail::string_keywords<boost::fusion::cons<boost::spirit::repository::qi::kwd_parser<boost::spirit::qi::expect<boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard, true, false>, boost::fusion::cons<boost::spirit::qi::char_class<boost::spirit::tag::char_code<boost::spirit::tag::char_, boost::spirit::char_encoding::ascii> >, boost::fusion::nil_> > >, char const (&)[2], ... too long to be quoted ...
As a workaround I was able to compile the example with -DBOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK and -DBOOST_RESULT_OF_USE_TR1 (any macro is working). Unfortunately, these flags breaks the my spirit parser in some other way with lot of other but similar errors.
The real problem may be in Boost.Fusion. The best workaround I can use by now is to change the line in boost/fusion/support/detail/result_of.hpp from
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) |
to
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) |
to prevent the define of macro BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF
Then I'm able to compile my project with keywords from spirit repository together with -DBOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK
uname -a Darwin nikki.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
clang++ -v clang version 3.7.0 (trunk 241984) Target: x86_64-apple-darwin14.4.0 Thread model: posix
boost 1.58.
Change History (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed: https://github.com/boostorg/spirit/pull/256