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

bimap construction process seems to discard return value of function (std::less) with 'nodiscard' attribute #28

Open
tkingcer opened this issue Mar 30, 2021 · 1 comment

Comments

@tkingcer
Copy link

By using boost 1.72.0.0 c++ library and the recent release of Visual Studio 2019 (version 16.9), we found that a warning "warning C4834: discarding return value of function with 'nodiscard' attribute" appears in the bimap construction, as illustrated in the following.
image

After doing some exploarions, we found that VS 2019 16.9 set all the operators, including std::less, with [[nodiscard]] attribute in the commit https://github.com/microsoft/STL/commit/b4af6e98f88df3a283dc2b2f1af9616684173ab4#diff-e3f9e6952fd73d97f01dd5f71b44bf0f195dc24eae335e5c0138ff25c6b559dd. As the bimap construction process uses std::less operator and seems to discard the returned bool value (see BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) in concept_check.hpp), such warning thus appears.

Will bimap community paln to solve this issue?

@egegumus
Copy link

egegumus commented Jan 30, 2024

having the exact same issue with my codebase. any news on this?
boost v1.74
vs 2019 v16.11.28

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