Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-04-23 11:45:02


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, April 23, 2002 5:41 PM
Subject: Re: [boost] boost::bind() and Comeau

> From: "Peter Dimov" <pdimov_at_[hidden]>
> > From: "Giovanni Bajo" <giovannibajo_at_[hidden]>
> [...]
> > If this doesn't help you can use a custom configuration file. You're
right
> > that we can't patch comeau.hpp since there is apparently no way to
detect
> > whether void returns are supported or not.
>
> Actually there is. _MSC_VER is 1 in strict mode, and 1200 in Microsoft
mode.
> I've modified comeau.hpp appropriately.

Thanks. Other glitches: in several points of Boost, _MSC_VER is used to test
if the current compiler is Microsoft Visual Studio. As we have seen, this is
not a comprehensive test, since, for Comeau, the real test has probably to
be "_MSC_VER > 1". An example can be arithmetic_traits.hpp:

#elif defined(__BORLANDC__) || defined(_MSC_VER)
template <> struct is_integral<const volatile unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<const volatile __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif //__int64

This fails in strict mode because __int64 (and long long) is not standard.
I suggest to define a BOOST_MSVC to be defined when Visual C++ is used (or
when using other compilers that work in "msvc emulation" mode like Comeau -
but not in strict mode - or Codewarrior), and to modify Boost everywhere so
that it checks against this macro instead of _MSC_VER.

Giovanni Bajo


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