Closed hazelnusse closed 4 years ago
I vaguely remember that this is already fixed in the feature branch, but I suspect maybe not as completely as yours. Thanks for the BR and PR #207 !
No problem @ned14, happy to help.
It looks like the feature_branch
branch has the same logic with respect to BOOST_OUTCOME_NODISCARD
:
https://github.com/ned14/outcome/blob/feature_branch/boostify/include/boost/outcome/config.hpp#L54
Maybe you had a different branch in mind?
Fixed! Thanks for the BR!
If
__has_cpp_attribute
is defined but__has_cpp_attribute(nodiscard)
is false,BOOST_OUTCOME_NODISCARD
will end up as defined but empty because the__clang__
and_MSC_VER
branches will be skipped. In addition, the__clang__
branch should really be__clang__
or__GNUC__
since both of these support the__attribute__(warn_unused_result)
.Proposed fix is implemented in #207