Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-03-30 13:55:56


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, March 30, 2002 4:55 PM
Subject: Re: [boost] boost::bind() and Comeau

> 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.

Nor I do.

> 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.

I've checked and BOOST_NESTED_TEMPLATE is correctly defined as 'template'.
It looks like a compiler bug then.
Undefining BOOST_NO_VOID_RETURNS worked well for me in strict mode, while it
fails when compiling in Microsoft compatibility mode. The #if test in
comeau.hpp only checks if Comeau is using MSVC6 as a backend, but it does
not check if it is working in strict mode or not. It would not be a problem
of course if the void return workaround compiled correctly.

Giovanni Bajo


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