Re: Spirit X3 with on_success() calls on VS2015

Joel de Guzman <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 17/03/2016 10:54 PM, Mikael Asplund wrote:
> Hi!
>
> I seem to have run into a bug in spirit x3 (or more likely in VS2015, but there is no
> workaround in spirit).
>
> I have a small unit test like this:
>
> structXXX: x3::annotate_on_success{};
>
> ...
>
> autoa= x3::detail::has_on_success<XXX, parser::iterator_type, x3::unused_type,
> ast::Identifier&>();
>
> typedefdecltype(XXX().on_success(std::declval<iterator_type&>(),
> std::declval<iterator_type>(), std::declval<ast::Identifier&>(), x3::unused)) type;
>
> boolb= a;
>
> ensure(b);
>
> ...
>
> This builds fine on both Linux (clang and g++) and Windows (VS2015 Update 1-2 CTP), but
> the test (ensure()) fails on Windows only.
>
> That the typedef builds fine would indicate to me that the method is there and should be
> no problem calling (and again, this builds fine in VS2015, too).
>
> However, has_on_success somehow fails to detect this in VS2015, but it works fine on Linux.
>
> This results in my on_success() not being called on Windows.  I'm looking into this, but
> wanted to ask if someone have seen this before and is aware of this problem and why it
> occurs? Maybe someone with more knowledge is this area that can figure it out quickly?

Wow, I applaud your heroic efforts. I wish I can help more but I've given up on
this compiler a long time ago. This compiler reminds me of endless days trying
to figure out ICEs.

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=278785231&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.