Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-03-30 10:55:35


From: "Giovanni Bajo" <giovannibajo_at_[hidden]>
> Hello,
>
> boost::bind doesn't compile under Comeau 4.2.45.2c BETA#5 (almost latest
> version). This is one of the errors it emits:
>
> "d:\\boost_1_27_0\\boost/bind/mem_fn_vw.hpp", line 19: error: "inner_mf0"
is
> not a nonstatic data member or base class of class
> "boost::_mfi::mf0<R, T>"
> explicit BOOST_MEM_FN_NAME(mf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE
> BOOST_M
> EM_FN_NAME2(mf0)<R, T, F>(f) {}

The context is

template<class R, class T> struct BOOST_MEM_FN_NAME(mf0): public
mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)<R, T, R
(BOOST_MEM_FN_CC T::*) ()>
{
    typedef R (BOOST_MEM_FN_CC T::*F) ();
    explicit BOOST_MEM_FN_NAME(mf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE
BOOST_MEM_FN_NAME2(mf0)<R, T, F>(f) {}
};

so I don't see anything wrong with it.

> The code is a bit tough to understand, so I'm not sure whether it triggers
a
> bug in Comeau or it's simply non-standard. Anybody knows a possible
> work-around? I'd like to keep using boost and still being able to compile
in
> strict mode.

The fact that you are hitting the void return workaround code path means
that you are using Comeau in MSVC 6 compatibility mode; either
BOOST_NESTED_TEMPLATE is not defined to 'template', or there is a bug in
Comeau.

Try using the compiler in MSVC 7 mode instead and see if this fixes things.


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