Skip to content

Commit 2761b36

Browse files
committed
Fix warning about unused token
1 parent 7b86e5e commit 2761b36

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/algorithm.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,16 @@ TEST(algorithm_copy_scalar) {
7777
ASSERT(a == b);
7878
}
7979

80+
template <typename T>
81+
void unused(const T&) {}
82+
8083
TEST(algorithm_move_scalar) {
8184
array_of_rank<int, 0> a;
8285
move_only token;
83-
generate(a, [token = std::move(token)]() { return rand(); });
86+
generate(a, [token = std::move(token)]() {
87+
unused(token);
88+
return rand();
89+
});
8490

8591
array_of_rank<int, 0> b;
8692
copy(a, b);

0 commit comments

Comments
 (0)