Skip to content

Commit f17940f

Browse files
committed
Target all versions of value() for suppression of MSVC warning C4702 (#81, thanks @rconde01)
1 parent 194b3f6 commit f17940f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/nonstd/expected.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,6 @@ class nsel_NODISCARD expected
22932293
? ( contained.value() )
22942294
: ( error_traits<error_type>::rethrow( contained.error() ), contained.value() );
22952295
}
2296-
nsel_RESTORE_MSVC_WARNINGS()
22972296

22982297
#if !nsel_COMPILER_GNUC_VERSION || nsel_COMPILER_GNUC_VERSION >= 490
22992298

@@ -2312,6 +2311,7 @@ class nsel_NODISCARD expected
23122311
}
23132312

23142313
#endif
2314+
nsel_RESTORE_MSVC_WARNINGS()
23152315

23162316
constexpr error_type const & error() const &
23172317
{

0 commit comments

Comments
 (0)