Boost logo

Boost Users :

Subject: [Boost-users] [rational] numeric_limits not specialized
From: Michael Olea (oleaj_at_[hidden])
Date: 2013-08-19 19:14:34


Hi.

I have some template code that needs slightly different behavior when it is instantiated
with exact types like int or boost::rational rather than when it is instantiated with
floating point types. The compile-time test depends on std::numeric_limits<T>::is_exact.
I was surprised when this came back false for boost::rational until I found that
std::numeric_limits<boost::rational<long>>::is_specialized
is false. Shouldn't boost::rational specialize numeric_limits?

I'm using boost 1.54.0 with clang: Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
compiling for C++1.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net