|
|
|
|
|
by dwattttt
687 days ago
|
|
Generic dispatching all the type combinations (or warning or erroring) wouldn't be a problem in a project the scale of the Linux kernel. I'm unfamiliar with the incantations needed to try preserve constant expressions though, that might be too much for them. |
|
[1] `_Generic` also requires at least two because you need one copy to select the generic implementation and another to call it. C23 `typeof` (or the equivalent GNU extension) allows for a compact type tuple matching: