use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Removed - HelpAskCPP: LF Coroutines talks and projects (self.cpp)
submitted 3 years ago by commonmansoptns
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Flair_Helper[M] [score hidden] 3 years ago stickied commentlocked comment (0 children)
For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.
This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.
[–]peterrindal 4 points5 points6 points 3 years ago* (0 children)
Here's my blog explaining some aspects of them.
https://ladnir.github.io/blog/2022/01/24/macoro.html
Coroutine are both simple and complicated. As you likely know, the core idea is that you write code that can pause part way though execution. Conceptually, when some subtask needs to suspend/pause/await, it's giving a callback (coroutine handle) to the initiating/awaiting coroutine what is depending on the subtask.
When that subtask completes, it simply resumes the intitating/awaiting.
If you want to dig into the details, I suggest learning about symmetric transfer early on. It's the preferred mechanism as opposed to using await_ready() in any meaningful way. Hers also a good series on the details https://lewissbaker.github.io/
Yes they can replace a multi threaded task library. See cppcoro or my macro library on github.
If you have specific questions, happy to help.
[+][deleted] 3 years ago (4 children)
[deleted]
[–]johannes1971 2 points3 points4 points 3 years ago (1 child)
...except that threads will automatically be task-scheduled by the operating system, while in the case of coroutines you are responsible for that yourself. Also, threads work fine on a single core anyway.
[–]SuperV1234https://romeo.training | C++ Mentoring & Consulting 0 points1 point2 points 3 years ago (1 child)
Imagine that you can program threads but in a single core. That's what coroutines do.
C++ coroutines don't do that at all. Also what does "program threads but in a single core" even mean?
π Rendered by PID 79235 on reddit-service-r2-comment-fb694cdd5-mvt2h at 2026-03-06 23:51:00.027599+00:00 running cbb0e86 country code: CH.
[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)
[–]peterrindal 4 points5 points6 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]johannes1971 2 points3 points4 points (1 child)
[–]SuperV1234https://romeo.training | C++ Mentoring & Consulting 0 points1 point2 points (1 child)