[FR]: EXPECT_NO_THROW
and ASSERT_NO_THROW
don't play nice with [[nodiscard]]
#4679
Labels
EXPECT_NO_THROW
and ASSERT_NO_THROW
don't play nice with [[nodiscard]]
#4679
Does the feature exist in the most recent commit?
Tested on
v1.13.0
, but the same problem also exists at head:googletest/googletest/include/gtest/internal/gtest-internal.h
Lines 1367 to 1373 in 79219e2
where
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_()
expands asgoogletest/googletest/include/gtest/internal/gtest-internal.h
Lines 1312 to 1316 in 79219e2
Why do we need this feature?
I can work around it by doing
but I feel like gtest should render this nicety for me.
Describe the proposal.
Wrap
statement
instatic_cast<void>(statement)
orstd::ignore = statement
. The former is probably more general.Is the feature specific to an operating system, compiler, or build system version?
No.
The text was updated successfully, but these errors were encountered: