|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-06-04 07:30:47
"John Maddock" wrote:
_______________________________________________
>> 13. t1_quantity/operations/compare.hpp:
>>
>> The
>> #include <cmath>
>>
>> should be replaced with
>>
>> #include <boost/compatibility/cpp_c_headers/cmath>
>>
>> which works for Intel C++ plugged
>> in VC6 IDE with old Dinkumware.
>>
>> The header
>> <boost/compatibility/cpp_c_headers/cmath>
>> has a bug (abs() is missing) but it has
>> been reported.
>
> Um no, those compatibilty headers *only work for broken compilers* for std
> conforming lib's that really do define the C names in namespace std they
> do
> not contain legal code. The idea is that if you are one of the few people
> still needing these headers then you'll simply add them to your include
> path.
>
The problem boils down to:
#include <cmath>
int main()
{
using namespace std; // error, no std namespace exists
}
on any compiler using the old Dinkumware.
The TU would not include anything else from
std namespace, as it happened with one of pqs tests.
---------------
The fix within pqs would be:
#include <cmath>
#ifdef old-Dinkumware
namespace std {
using ::abs; // possibly others, or empty, just make std::
}
#endif
...
/Pavel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk