bimap construction process seems to discard return value of function (std::less) with 'nodiscard' attribute
- Dominant language
- C++
- Stars
- 26
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
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.

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](url). 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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.