top | item 46330595 (no title) lights0123 | 2 months ago GCC adds similar syntax as an extension to C: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.htmlIt's used all throughout the Linux kernel and useful for macros. discuss order hn newest Rucadi|2 months ago The best part of statement expressions is that a return there returns from the function itself, not from the statement expr.I use that with with macros to return akins to std::expected, while maintaining the code in the happy-path like with exceptions.
Rucadi|2 months ago The best part of statement expressions is that a return there returns from the function itself, not from the statement expr.I use that with with macros to return akins to std::expected, while maintaining the code in the happy-path like with exceptions.
Rucadi|2 months ago
I use that with with macros to return akins to std::expected, while maintaining the code in the happy-path like with exceptions.