Re: X3 boost::optional<std::string> problem.

Tom Kulaga <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CAMWfBPEO1EKDfqp9QOvgT7myuP-yXev27LMVFyrdyN8NMBG5bg@mail.gmail.com>
when i broke it up, into a quotedString_def ... quotedString_class and
quotedString_type then used BOOST_SPIRIT_DEFINE the error went away.

I'll try and get a minimal compil-able example

On Tue, 26 Jul 2016 at 00:34 Tom Kulaga <[email protected]> wrote:

> Hi All,
>
> I have the following string parser:
>
> const auto nonQuotedString = lexeme[*(char_ - lit(" ")) >> lit(" ")];
>
>
> When I stick this into a rule_def such that this is optional,
>
>
> -nonQuotedString and I have the corresponding boost::optional<std::string> in my struct. It doesn't and mentions that optional doesnt have insert method.
>
>
> THOUGH if i change it to -char_ and change my struct accordingly, it compiles.
>
>
> So by me having an optional std::string as part of my struct and parsing, it doesn't compile.
>
>
> Would anyone have any ideas?
>
>
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.