Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-08-06 05:52:20


Peder Holt writes:
> Hi. I am porting Fusion, Joel de Guzmans new tuple library to MSVC 6.5
> and VC 7.0.
> Several of the testcases ICEs on MSVC 6.5.
> I traced the problems back to integral_c's operator int()
> Problem:
> When the template expressions gets too complicated, MSVC is unable to
> handle inlined functions inside a type computer struct.
> Solution:
> Place the function body outside of the struct.
>
> The relevant lines:
> operator AUX_WRAPPER_VALUE_TYPE() const
> #if BOOST_WORKAROUND(BOOST_MSVC,==1200)
> ;
> #else
> {
> return static_cast<AUX_WRAPPER_VALUE_TYPE>(this->value);
> }
> #endif
> };
>
> #if BOOST_WORKAROUND(BOOST_MSVC,==1200)
> template< AUX_WRAPPER_PARAMS(N) >
> AUX_WRAPPER_INST(N)::operator AUX_WRAPPER_VALUE_TYPE() const
> {
> return static_cast<AUX_WRAPPER_VALUE_TYPE>(this->value);
> }
> #endif
>
> This change fixed most of the remaining (known) issues with
> Fusion & MSVC
> Is it OK if I check in these changes?

If it doesn't break "libs/mpl/test/int.cpp" and "libs/mpl/test/for_each.cpp"
tests, go ahead.

--
Aleksey Gurtovoy
MetaCommunications Engineering

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