Re: mini-c example does not compile (msvc2015, win32, boost 1.63)

Frank Hein <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <OF56AF02AB.C317FC3B-ONC12580E7.006E3CF1-C12580E7.006EA404@maxence.de>
Seth <[email protected]> wrote on 04.03.2017 16:02:08:

> From: Seth <[email protected]>
> To: Spirit General Mailing List <[email protected]>
> Date: 04.03.2017 16:03
> Subject: Re: [Spirit-general] mini-c example does not compile 
> (msvc2015, win32, boost 1.63)
> 
> On 04-03-17 04:30, Frank Hein wrote:
> > 
///////////////////////////////////////////////////////////////////////
> > // Error handling: on error in expr, call error_handler.
> >         on_error<fail>(expr,
> >             error_handler_function(error_handler)(
> >                 "Error! Expecting ", _4, _3));
> 
> Suggestions:
> 
> 
>  - spell it `+"Error! Expecting "` so that you explicitly decay  it
> before it gets forwarded
> 
>  - use `boost::phoenix::val("Error! Expecting ")` to explicitly lift the
> expression to a phoenix actor
> 
> 
Thanks. Or just
std::string msg = "Error! Expecting ";
   on_error<fail>(expr,
   error_handler_function(error_handler)(
       msg, _4, _3));

I can confirm that this issue was introduced with MSVC 2015. 2013, 2012, 
2010
and 2008 do not complain.
 

> 
> 
> 
------------------------------------------------------------------------------
> 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
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
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.