Boost logo

Boost :

From: Peder Holt (peder.holt_at_[hidden])
Date: 2004-08-05 12:37:34


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?

--
Peder Holt





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