Boost logo

Boost :

From: François Barel (frabar666_at_[hidden])
Date: 2007-11-22 13:18:59


Hi,

When using Boost.Lambda (r41287) with MSVC8 SP1 (v14.0.50727.762) in
one of my projects, I get an ICE in
boost/lambda/detail/arity_code.hpp, line 49 (get_arity::value) when
compiling in Release mode (with PCH and LTCG).

Basically the use case is something like this, really nothing
particular about it as far as I can tell (I use the same construct all
over the place):

--------------------

 template< typename T > bool Swallow(const T& t) {
   try { t(); return true; }
   catch (...) { return false; }
 }

 struct Foo {
   void Bar() { Swallow(bind( &Foo::DoBar, this )); }
                       // ^^ ICE in arity_code.hpp during this instantiation
   void DoBar() { ... }
 };

--------------------

Unfortunately I couldn't make a repro case outside this specific project...

The "usual" fix of splitting the complex expression (get_arity::value)
with the help of a separate typedef solved the problem for me. I
attached the patch (from trunk/) I used.

Cheers,
Francois




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