Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2002-04-23 19:13:05


On Tuesday, April 23, 2002, at 03:49 PM, Giovanni Bajo wrote:

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

Sounds right to me, but I don't work in this MSVC world at all, so I
can't really say.

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

The harm would be that they'd all have to include <boost/config.hpp>.
And it would also harm non-MSVC compilers that set _MSC_VER, because
they support #pragma once just fine -- so it makes no sense to change
those.

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

Sounds right, but we'd have to test it to see that it works.

> 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:
> //

Looks good to me. Again, the real issue is testing it.

     -- Darin


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