Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-05-24 21:25:39

Both octonion_test.cpp and quaternion_test.cpp, at about line 94, contain
the following:

// Provide standard floating point abs() overloads for MSVC
//#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || (defined(_MSC_EXTENSIONS) &&
BOOST_MSVC < 1310)

That looks like a workaround for the fact that prior to VC++ 7.1, the
Microsoft C library did not define abs(float) etc. if _MSC_EXTENSIONS was

The Intel compiler uses the Microsoft libraries, and defines
_MSC_EXTENSIONS, but of course BOOST_MSVC is not defined. That causes the
workaround code to be included, resulting in multiple definitions, if the
Microsoft library 1310 (7.1) or later is being used.

I believe the corrected code should read:

// Provide standard floating point abs() overloads if older Microsoft
// library is used with _MSC_EXTENSIONS defined. This code also works
// for the Intel compiler using the Microsoft library.
#if defined(_MSC_EXTENSIONS) && defined(_MSC_VER) && _MSC_VER < 1310

I've committed this change to CVS for both source files on the assumption
that this suits the library maintainer. If not, or there is something wrong
with the fix, please feel free to revert the changes.


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