2 ms·
C already had auto, for automatic storage class specification. It's the default anyway, so I've never seen it used in the wild.
by Y_Y 2y ago
C already had auto, for automatic storage class specification. It's the default anyway, so I've never seen it used in the wild.
- hmry 2y agoC++ had that too, in 1998. C++11 and C23 changed the meaning of auto to mean "infer this type".
- Y_Y 2y agoThat's helpful, but not entirely true. The old meaning remains in C23 for explicitly specified types, and the `auto` of C23 and C++11 have some notable differences: https://dev.to/pauljlucas/auto-in-c23-ij9 https://dev.to/pauljlucas/auto-in-c23-ij9