boostorg / spirit

Boost.org spirit module
http://boost.org/libs/spirit
395 stars 162 forks source link

Some headers are not self-sufficient #695

Closed slymz closed 3 years ago

slymz commented 3 years ago

See https://godbolt.org/z/rjdGMeTMn

This one-liner

#include <boost/spirit/repository/include/qi_keywords.hpp>

Fails with:

error C3878: syntax error: unexpected token 'identifier' following 'expression'
note: This diagnostic occurred in the compiler generated function 'bool boost::spirit::repository::qi::detail::parse_dispatcher<Elements,Iterator,Context,Skipper,Flags,Counters,Attribute,NoCasePass>::call_subject_unused(const Subject &,Iterator &,const Iterator &,Context &,const Skipper &,Index &) const'
 note: see reference to class template instantiation 'boost::spirit::repository::qi::detail::parse_dispatcher<Elements,Iterator,Context,Skipper,Flags,Counters,Attribute,NoCasePass>' being compiled

[..]
slymz commented 3 years ago

.. but with the following two extra headers, it does:

#include <boost/fusion/algorithm/query/any.hpp>
#include <boost/spirit/repository/home/qi/directive/kwd.hpp>

#include <boost/spirit/repository/include/qi_keywords.hpp>

https://godbolt.org/z/14W774fsW