File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class reference_wrapper : public __weak_result_type<_Tp> {
6262
6363 // invoke
6464 template <class ... _ArgTypes>
65- [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t <type&, _ArgTypes...>
65+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __invoke_result_t <type&, _ArgTypes...>
6666 operator ()(_ArgTypes&&... __args) const
6767#if _LIBCPP_STD_VER >= 17
6868 // Since is_nothrow_invocable requires C++17 LWG3764 is not backported
Original file line number Diff line number Diff line change @@ -56,9 +56,6 @@ void test() {
5656
5757 std::reference_wrapper<int > rw{i};
5858 rw.get (); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
59- std::function<int (int )> vf;
60- auto rwf = std::ref (vf);
61- rwf (1 ); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
6259
6360 std::ref (i); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
6461 std::cref (i); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
You can’t perform that action at this time.
0 commit comments