Opened 6 years ago
Closed 5 years ago
#12349 closed Bugs (fixed)
no type named ‘types’ in ‘boost::spirit::qi::detail::find_substitute
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.61.0 | Severity: | Showstopper |
Keywords: | Cc: | tomka@… |
Description
build log - ht tp://pastehtml.com/view/gn17nmexx.html
freeorion bug - ht tps://github.com/freeorion/freeorion/issues/777 gentoo bug - ht tps://bugs.gentoo.org/show_bug.cgi?id=584354
sample message: /usr/include/boost/spirit/home/qi/detail/alternative_function.hpp:30:46: error: no type named ‘types’ in ‘boost::spirit::qi::detail::find_substitute<boost::optional<boost::variant<std::vector<Effect::EffectBase*>, Effect::EffectBase*, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> >, std::vector<Effect::EffectBase*> >::variant_type {aka class boost::optional<boost::variant<std::vector<Effect::EffectBase*>, Effect::EffectBase*, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> >}’
typedef typename variant_type::types types;
Attachments (1)
Change History (15)
comment:1 by , 6 years ago
comment:3 by , 6 years ago
Hello,
the same issue affects FreeOrion in Debian, compiled with Boost 1.61 and GCC-6.
Build log:
Debian bug report:
https://bugs.debian.org/833773
This is apparently a regression because FreeOrion builds fine with Boost 1.58 and GCC-6.
comment:4 by , 6 years ago
Component: | None → spirit |
---|---|
Owner: | set to |
comment:6 by , 6 years ago
Similar issue in compiling rasdaman with Boost 1.61; 1.60 works fine.
Still same in Boost 1.62.
by , 5 years ago
Attachment: | spirit_test.cpp added |
---|
Reduced gramar that fails to build with boost 1.63 / gcc 6.2
comment:7 by , 5 years ago
I managed to reduce the problem to a very simple grammar, that I've attached to this ticket. The problem seems to be that boost.spirit, for some reason, assumes there is a nested field called "types" in boost::optional, that was removed after 1.61, that was defined:
typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
This is blocking a release of one of our tools, so if there was any workaround that we can patch locally, I'll take it for the time being.
comment:8 by , 5 years ago
Severity: | Problem → Showstopper |
---|
comment:11 by , 5 years ago
OK, seems this is is already fixed in the latest devel which should already make it to the latest Boost release. See line 141 alternative_function.hpp
fix for alternative.cpp test case, FHE 2016-07-28
comment:12 by , 5 years ago
Joel,
Thanks for the reply. I did try that patch that you mention while browsing the github repo, but my sample test failed to compile with another error (I'll provide the info ass soon as possible). Maybe it is because I just patched that single file (alternative_function.hpp) but there are more changes that it builds upon(*).
I'll re-try the patch on a clean build and report back.
Thanks for paying attention to the ticket!
Cheers, Juan Pablo
(*) There are corporate reasons shy I can't just move on to the latest version of boost, so I'm trying to figure out the minimum subset of changes needed to patch our current 1.63 build.
comment:14 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I confirm