Re: R: R: R: Error only on G++ Debian

Seth <[email protected]> Mon, 22 Jan 2018 19:17:01 +0100
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 22-01-18 18:20, Claudio La Rosa wrote:
>         void parseFirstStep(string line)
>         {
>                 phrase_parse(line.begin(), line.end(), start, ascii::space);
>         }

Your iterator type needs to be `std::string::const_iterator` so either
use `line.cbegin()` or make the argument const&:


    void parseFirstStep(std::string const& line) {
        phrase_parse(line.cbegin(), line.cend(), start, qi::ascii::space);
    }

Note also that `using std::string` doesn't seem like a splendid idea
(especially when using Qi).

Finally, note that currently, the skipper is completely unused because
the start rule is declared without a skipper (see
https://stackoverflow.com/questions/17072987/boost-spirit-skipper-issues/17073965#17073965)   


Cheers,

Seth


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general