Subject: [Boost-bugs] [Boost C++ Libraries] #11493: Cannot compile qi::keyword directive test in c++11/14 modes.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-22 17:10:24
#11493: Cannot compile qi::keyword directive test in c++11/14 modes.
------------------------------+---------------------
Reporter: nikkikom@⦠| Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.58.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
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
#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) ||
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
to
#if (!defined(BOOST_RESULT_OF_USE_DECLTYPE) &&
!defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) ||
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11493> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC