Re:My tutorial and take on C++20 coroutines
by zabzonk on Monday February 22, 2021 @05:21AM
(#26222823)
I copy and pasted `void main()` from the article. If you read the SO question I linked, you would see that `void` is not a valid return type for `main`.
[ Parent
| on HN ]
Re:My tutorial and take on C++20 coroutines
by mazieres on Monday February 22, 2021 @05:46AM
(#26222997)
Oh, that must be a typo in the document, sorry. I just fixed it. The actual corodemo.cc file was correct, though: http://www.scs.stanford.edu/~dm/blog/corodemo.cc
Also, here's a more authoritative source than stack overflow for the return type of main: https://timsong-cpp.github.io/cppwp/n4861/basic.start.main#2