Opened 10 years ago

Last modified 9 years ago

#7187 new Feature Requests

boost::rational doesn't provide stream operators for wide streams

Reported by: Mathias Hasselmann <mathias@…> Owned by: Jonathan Turkanis
Milestone: To Be Determined Component: rational
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

There are std::istream& operator>> (std::istream& is, rational<IntType>& r) and std::ostream& operator<< (std::ostream& os, const rational<IntType>& r), but no wide stream versions.

Attachments (1)

rational-wide-streams.patch (2.1 KB ) - added by Mathias Hasselmann <mathias@…> 10 years ago.
One possible patch

Download all attachments as: .zip

Change History (4)

by Mathias Hasselmann <mathias@…>, 10 years ago

Attachment: rational-wide-streams.patch added

One possible patch

comment:1 by Mathias Hasselmann <mathias@…>, 10 years ago

Actually it also would be worth to figure out why std::wostringstream accepts the << operator without this patch applied. Appears like some unsafe typecast taking place.

comment:2 by viboes, 10 years ago

Component: Nonerational
Owner: set to Jonathan Turkanis
Type: BugsFeature Requests

comment:3 by Daryle Walker, 9 years ago

(In [85519]) Started modernizing Boost.Rational I/O (refs #7187)

Note: See TracTickets for help on using tickets.