|
|
Log in / Subscribe / Register

Void is surprisingly useful.

Void is surprisingly useful.

Posted Sep 13, 2026 9:35 UTC (Sun) by koflerdavid (subscriber, #176408)
In reply to: Void is surprisingly useful. by alx.manpages
Parent article: Stabilizing Rust's never type

Thanks for showing this, I didn't know this compiles.


to post comments

Void is surprisingly useful.

Posted Sep 13, 2026 11:31 UTC (Sun) by alx.manpages (subscriber, #145117) [Link]

Another --more interesting-- example is with the ternary operator:

#define assert(e)  ((e) ? (void)0 : abort())


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds