Skip to content

boost::rational serialized as wstring returns always "1" #40

@sriediger

Description

@sriediger

Dear boost rational team,

converting boost rational to wstring always returns "1" instead of the correct value
const boost::rational<int> editRate(1, 3); std::cout << editRate << "\n"; // -> 1/3 , OK std::wcout << editRate << L"\n"; // -> 1 , Error
Tested with boost 1.71.0/1.66.0, Visual C++ 2017/Compiler Explorer GCC 9.2.

https://godbolt.org/z/STtFqN

boost_rational_wstring_error

best regards,
Stefan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions