Skip to content

Commit 194a500

Browse files
committed
another unused variable detected by MSVC++
1 parent e6f7222 commit 194a500

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/beman/execution26/detail/allocator_aware_move.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ template <typename T, typename Context>
1919
* \headerfile beman/execution26/execution.hpp <beman/execution26/execution.hpp>
2020
* \internal
2121
*/
22-
auto allocator_aware_move(T&& obj, Context&& context) -> decltype(auto) {
22+
auto allocator_aware_move(T&& obj, Context&& context) noexcept -> decltype(auto) {
2323
if constexpr (requires { ::beman::execution26::get_allocator(::beman::execution26::get_env(context)); }) {
2424
if constexpr (decltype(::beman::execution26::detail::is_product_type(obj))()) {
2525
return obj.make_from(::beman::execution26::get_allocator(::beman::execution26::get_env(context)),

tests/beman/execution26/exec-sync-wait.test.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ auto test_sync_wait_receiver() -> void {
158158
} catch (const error& e) {
159159
ASSERT(e.value == 17);
160160
} catch (...) {
161-
ASSERT(nullptr ==
162-
"unexpected exception type"); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
161+
// NOLINTNEXTLINE(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
162+
ASSERT(nullptr == "unexpected exception type");
163163
}
164164
}
165165
{
@@ -175,8 +175,8 @@ auto test_sync_wait_receiver() -> void {
175175
} catch (const error& e) {
176176
ASSERT(e.value == 17);
177177
} catch (...) {
178-
ASSERT(nullptr ==
179-
"unexpected exception type"); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
178+
// NOLINTNEXTLINE(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
179+
ASSERT(nullptr == "unexpected exception type");
180180
}
181181
}
182182
{
@@ -209,18 +209,18 @@ auto test_sync_wait() -> void {
209209
} catch (const error& e) {
210210
ASSERT(e.value == 17);
211211
} catch (...) {
212-
ASSERT(
213-
nullptr ==
214-
"no exception expected from sync_wait(just(...)"); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
212+
// NOLINTBEGIN(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
213+
ASSERT(nullptr == "no exception expected from sync_wait(just(...)");
214+
// NOLINTEND(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
215215
}
216216

217217
try {
218218
auto value{test_std::sync_wait(send_stopped())};
219219
ASSERT(not value);
220220
} catch (...) {
221-
ASSERT(
222-
nullptr ==
223-
"no exception expected from sync_wait(just(...)"); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
221+
// NOLINTBEGIN(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
222+
ASSERT(nullptr == "no exception expected from sync_wait(just(...)");
223+
// NOLINTEND(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
224224
}
225225
}
226226
} // namespace

tests/beman/execution26/stoptoken-mem.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ TEST(stoptoken_mem) {
9696
test_stop_token_swap();
9797
test_stop_token_stop_requested();
9898
test_stop_token_stop_possible();
99-
} catch (const std::exception& e) {
99+
} catch (...) {
100100
// NOLINTBEGIN(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
101101
ASSERT(nullptr == "the stop token tests are not expected to throw");
102102
// NOLINTEND(cert-dcl03-c,hicpp-static-assert,misc-static-assert)

0 commit comments

Comments
 (0)