Skip to content

Commit 3c60ea2

Browse files
author
Joseph Malle
committed
Annotate async_generator, generator, and task with [[nodiscard]]
1 parent 5294db8 commit 3c60ea2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/cppcoro/async_generator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ namespace cppcoro
346346
}
347347

348348
template<typename T>
349-
class async_generator
349+
class [[nodiscard]] async_generator
350350
{
351351
public:
352352

include/cppcoro/generator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ namespace cppcoro
160160
}
161161

162162
template<typename T>
163-
class generator
163+
class [[nodiscard]] generator
164164
{
165165
public:
166166

include/cppcoro/task.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ namespace cppcoro
280280
/// caller. Execution of the coroutine body does not start until the
281281
/// coroutine is first co_await'ed.
282282
template<typename T = void>
283-
class task
283+
class [[nodiscard]] task
284284
{
285285
public:
286286

0 commit comments

Comments
 (0)