Boost logo

Boost :

Subject: [boost] [spirit] VC10 ICE when defining a Karma/Qi rule in a 0x lambda
From: Lars Viklund (zao_at_[hidden])
Date: 2010-04-28 08:36:02


Hi list,

I encountered a rather amusing/horrible compiler error today when trying
to wrap my head around the new Spirit.

Apparently, VC++10 experiences a fatal internal compiler error when
defining a Karma or Qi rule inside a lambda expression, as shown in the
attached source at the bottom of this mail (and in the bug report).

I reported a spirit bug [1] and a kind soul on the #boost channel linked me
a similar Microsoft Connect bug [2], which seems to have sadly been
ignored.

I've got no idea in what edge of Spirit to start investigating this, as
there's deep magic going on inside it, and would appreciate advice on
what might be at fault, and whether there are any knobs I can twiddle.

Could it be related to the recent thread on incomplete decltypes and odd
rvalue references that VC10 has?

[1] https://svn.boost.org/trac/boost/ticket/4160
[2] http://connect.microsoft.com/VisualStudio/feedback/details/541534/internal-compiler-error-in-lambda-expression#

//---8<---
#include <boost/spirit/include/karma.hpp>

int main() {
  []() {
    boost::spirit::karma::rule<char*> r;
  };
}
//---8<---

-- 
Lars Viklund | zao_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk