Post #1897175
2026-05-02 21:49 UTC
@fay59@tech.lgbt @thephd@pony.social you can use `default` ... `_Generic(X, default x: ...)` should work. https://godbolt.org/z/3bGKqaWPK
Replies (1)
-
@thephd@pony.social 2026-05-02 23:21
@typeswitch@gamedev.lgbt @fay59@tech.lgbt Yeah, I think auto should be reserved for if it ever gets more advanced and we use auto for something closer to "safe type deduction that does not trigger type checking errors" rather than another way to spell default. auto would also provide opportunities for const auto x: (all const variables but not mutable ones), auto *p: (all pointer variables), and things of that nature.