Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2005-06-23 08:25:31


Sample program:

---%<---
#include <limits>
#include <iostream>

using namespace std;

int main()
{
   cout << numeric_limits<long long>::is_specialized << '\n';
   cout << numeric_limits<unsigned long long>::is_specialized << '\n';
}
--->%---

Compiling and running this on Tru64/CXX with relaxed ANSI mode gives:

schoepf_at_area51:~/net/tmp> cxx -version V6.5-042 -O0 -std ansi -model ansi
./test_ll_limits.cpp && ./a.out
1
1

Compiling and running this on Tru64/CXX with strict ANSI mode gives:

schoepf_at_area51:~/net/tmp> cxx -version V6.5-042 -O0 -std strict_ansi -model
ansi ./test_ll_limits.cpp && ./a.out
cxx: Warning: ./test_ll_limits.cpp, line 8: the type "long long" is nonstandard
   cout << numeric_limits<long long>::is_specialized << '\n';
------------------------------^
cxx: Warning: ./test_ll_limits.cpp, line 9: the type "long long" is nonstandard
   cout << numeric_limits<unsigned long long>::is_specialized << '\n';
---------------------------------------^
0
0

But when running configure in libs/config with CXX="cxx -version V6.5-042
-std strict_ansi -model ansi" bash ./configure,
BOOST_NO_LONG_LONG_NUMERIC_LIMITS doesn't get defined in the resulting
"user.hpp".

The relevant section from the log file looks like this:

configure:2190: checking std::numeric_limits<long long>
configure:2220: cxx -version V6.5-042 -std strict_ansi -model ansi -o
conftest -I./../.. -I./../../libs/config/test -g -DBOOST_NO_CONFIG
conftest.cpp -lrt -lm >&5
configure:2223: $? = 0

Why does configure think that the specializations are present?

Markus


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