Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sriediger opened this issue Nov 3, 2019 · 1 comment
Open

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

sriediger opened this issue Nov 3, 2019 · 1 comment

Comments

@sriediger
Copy link

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

@nyanpasu64
Copy link

I've experienced similar issues with other serialization methods. I think the rational is being converted to a bool, then printed as an integer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants