[rational] numeric_limits not specialized
19 Aug
2013
19 Aug
'13
11:14 p.m.
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.
4050
Age (days ago)
4050
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Olea