Skip to content

Commit 15d5458

Browse files
committed
Fixed issues
1 parent d4df484 commit 15d5458

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

libcxx/include/__functional/reference_wrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,25 @@ reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
128128
#endif
129129

130130
template <class _Tp>
131-
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI
131+
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI
132132
_LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp> ref(_Tp& __t) _NOEXCEPT {
133133
return reference_wrapper<_Tp>(__t);
134134
}
135135

136136
template <class _Tp>
137-
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp>
137+
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<_Tp>
138138
ref(reference_wrapper<_Tp> __t) _NOEXCEPT {
139139
return __t;
140140
}
141141

142142
template <class _Tp>
143-
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
143+
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
144144
cref(const _Tp& __t) _NOEXCEPT {
145145
return reference_wrapper<const _Tp>(__t);
146146
}
147147

148148
template <class _Tp>
149-
[[nodiscard]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
149+
[[__nodiscard__]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 reference_wrapper<const _Tp>
150150
cref(reference_wrapper<_Tp> __t) _NOEXCEPT {
151151
return __t;
152152
}

libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/robust_against_adl.pass.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ int main(int, char**)
2727
{
2828
Ptr x = nullptr;
2929
const Ptr cx = nullptr;
30-
std::ref(no_args)();
31-
std::ref(one_arg)(x);
32-
std::ref(one_arg)(cx);
33-
std::ref(two_args)(x, x);
34-
std::ref(two_args)(x, cx);
35-
std::ref(two_args)(cx, x);
36-
std::ref(two_args)(cx, cx);
37-
std::ref(three_args)(x, x, x);
38-
std::ref(three_args)(x, x, cx);
39-
std::ref(three_args)(x, cx, x);
40-
std::ref(three_args)(cx, x, x);
41-
std::ref(three_args)(x, cx, cx);
42-
std::ref(three_args)(cx, x, cx);
43-
std::ref(three_args)(cx, cx, x);
44-
std::ref(three_args)(cx, cx, cx);
45-
std::ref(one_arg_void)(x);
46-
std::ref(one_arg_void)(cx);
30+
(void)std::ref(no_args)();
31+
(void)std::ref(one_arg)(x);
32+
(void)std::ref(one_arg)(cx);
33+
(void)std::ref(two_args)(x, x);
34+
(void)std::ref(two_args)(x, cx);
35+
(void)std::ref(two_args)(cx, x);
36+
(void)std::ref(two_args)(cx, cx);
37+
(void)std::ref(three_args)(x, x, x);
38+
(void)std::ref(three_args)(x, x, cx);
39+
(void)std::ref(three_args)(x, cx, x);
40+
(void)std::ref(three_args)(cx, x, x);
41+
(void)std::ref(three_args)(x, cx, cx);
42+
(void)std::ref(three_args)(cx, x, cx);
43+
(void)std::ref(three_args)(cx, cx, x);
44+
(void)std::ref(three_args)(cx, cx, cx);
45+
(void)std::ref(one_arg_void)(x);
46+
(void)std::ref(one_arg_void)(cx);
4747

4848
return 0;
4949
}

0 commit comments

Comments
 (0)