Re: Linking problem with X3

Mikael Asplund <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hi!

Thank you for your help! Unfortunately removing the unused_type didn't help at all.
In fact, it doesn't change anything, strangely. I had expected at least the type in the error message to change slightly, but in fact it's byte for byte identical still... X3 automatically add it, if it's not there, maybe?

Either way, I'm no neared my goal, and still as confused :-)

Regards,
  Mikael

-----Original Message-----
From: Joel de Guzman [mailto:[email protected]] 
Sent: Friday, March 11, 2016 00:57
To: [email protected]
Subject: Re: [Spirit-general] Linking problem with X3

On 10/03/2016 6:30 PM, Mikael Asplund wrote:
> Hi!
>
> If I take the x3 calc9 example in Boost 1.60 and change in config.hpp from:
>
> typedefx3::with_context<error_handler_tag, 
> std::/reference_wrapper/<error_handler_type>
> const, phrase_context_type>::/type/
>
> ...to:
>
> typedefx3::with_context<error_handler_tag, 
> std::/reference_wrapper/<error_handler_type>
> const, x3::unused_type>::/type/
>
> ...and also change in main.cpp:
>
> boolsuccess= phrase_parse(iter, end, parser, /space/, ast);
>
> ...to:
>
> boolsuccess= parse(iter, end, parser, ast);
>
> ...I get a link problem:
>
[...]
>
> The question is why is this screws up the linking 
> (/BOOST_SPIRIT_INSTANTIATE/ macro seems to be instantiating the needed type)?
>
> Anyone out there with more experience with this? I'm utterly confused, 
> and I've been trying what I can think of for days!

     typedef x3::with_context<
         error_handler_tag
       , std::reference_wrapper<error_handler_type> const>::type
     context_type;

(i.e. don't inject the x3::unused_type context)

Regards,
--
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
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.