I’m not sure C++ has ever used the `_Yield` hack, except for C compatibility? C on the other hand uses it all the time.
It could be that I'm remembering it from C.
Re:C++20, How Hard Could It Be
by chippiewill on Sunday September 25, 2022 @04:31PM
(#32975839)
It's super common in C because C doesn't have namespaces and templates which means stuff C++ implements as namespaced library classes C has to implement as language keywords.
A good example is atomics. C++11 introduced `std::atomic`, C11 introduced the keyword `_Atomic`
Re:C++20, How Hard Could It Be
by nickysielicki on Monday September 26, 2022 @12:56AM
(#32979576)
Such a weak argument, you can fix this in your entire code base with a single call to sed. There is no reason to introduce a language feature with some weird prefix instead of changing existing code and having them prefix their variable names.
I’m nevertheless surprised that new noncontextual and previously-unreserved-identifier keywords were added at all. In earlier times, the approach would have been to use a reserved identifier like “_Yield” for the keyword, and to provide a standard opt-in header that would `#define yield _Yield`. Maybe they don’t want to add dependencies on the preprocessor anymore.