Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-04-23 17:49:53

----- Original Message -----
From: "Darin Adler" <darin_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, April 23, 2002 9:08 PM
Subject: Re: [boost] boost::bind() and Comeau

> We have BOOST_MSVC already. See,
> and search for BOOST_MSVC.

Ok. Then, comeau.hpp should define BOOST_MSVC when in MSVC mode, since it
acts exactly like it, right?

> > and to modify Boost everywhere so
> > that it checks against this macro instead of _MSC_VER.
> We normally fix things one at a time rather than doing a global replace.
> There are about 90 places that currently mention _MSC_VER, and many of
> these should probably be changed to BOOST_MSVC.

That's right.

I noticed that about 15 of them are wrappers against #pragma once, I reckong
those could be replaced with almost no harm.

About the _MSC_VER tests in arithmetic_traits.hpp, I've noticed that there
are two macros exactly about int64 support: namely, BOOST_NO_INT64_T and
BOOST_NO_INTEGRAL_64_T. So, the code in the file should be modified to check
the presence of this macro, rather than doing a test for the presence of a
certain compiler (since cstdint.hpp already contains all the logic to handle
64bit types). Four lines above, it tests for BOOST_HAS_LONG_LONG before
using 'long long' so I guess it should be the same for int64. Am I right?

Also, cstdint.hpp, which defines the above macros, does not take into
account Comeau at all. As already specified, Comeau supports __int64 in MSVC
mode (_MSC_VER > 1), while it doesn't support it in strict mode (_MSC_VER ==
1). It looks to me that the test should be added around line 231:

# elif (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) ||
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x520))
     // we have Borland/Microsoft __int64:

Giovanni Bajo

Boost list run by bdawes at, gregod at, cpdaniel at, john at