Opened 9 years ago

Last modified 9 years ago

#9017 new Bugs

Support for std::numeric_traits

Reported by: Daryle Walker Owned by: Daryle Walker
Milestone: To Be Determined Component: rational
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc: oleaj@…

Description

Although boost::rational uses std::numeric_limits in its implementation, it does not provide its own (partial) specialization of the standard class template. This means that generic numeric code cannot use rational in contexts that use the assistance of numeric_limits.

This has been brought to my attention by Michael Olea in his message <http://lists.boost.org/boost-users/2013/08/79751.php> to the Users' list.

Attachments (1)

rational.hpp.patch (4.6 KB ) - added by awulkiew 9 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by oleaj@…, 9 years ago

Cc: oleaj@… added

by awulkiew, 9 years ago

Attachment: rational.hpp.patch added

comment:2 by awulkiew, 9 years ago

Since during the testing of some functions in Boost.Geometry I hit this problem I decided to help with it. I've attached a patch, not sure if all values are correct though.

Last edited 9 years ago by awulkiew (previous) (diff)
Note: See TracTickets for help on using tickets.