Open Bockeman opened 2 years ago
MCVE:
#include <boost/spirit/home/x3.hpp> #include <vector> int main() { using namespace boost::spirit::x3; char const* const s = "ab12", * const e = s + std::strlen(s); std::vector<std::vector<char>> v; parse(s, e, +(char_ >> char_), v); }
Workaround by using an intermediate rule:
#include <boost/spirit/home/x3.hpp> #include <vector> int main() { using namespace boost::spirit::x3; char const* const s = "ab12", * const e = s + std::strlen(s); std::vector<std::vector<char>> v; parse(s, e, +(rule<class BOOST_JOIN(rule_id_, __LINE__), std::vector<char>>{} = char_ >> char_), v); }
MCVE:
Workaround by using an intermediate rule: