Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lostdog
on Aug 13, 2022
|
parent
|
context
|
favorite
| on:
Why should I have written ZeroMQ in C, not C++ (20...
If compound statements every get standardized then you could write a TRY macro that worked pretty similarly.
https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
bear24rw
on Aug 13, 2022
|
next
[–]
SerenityOS uses this pattern heavily:
https://github.com/SerenityOS/serenity/blob/master/AK/Try.h
dureuill
on Aug 13, 2022
|
prev
[–]
Yes we've been using this. Unfortunately it is not standard and iiuc msvc has no equivalent?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html