7 ms·
Have always wondered, why can’t nested functions just be normal functions inside a namespace? It seems silly to expose a tiny helper to the entire compilation
by BobbyTables2 18d ago
Have always wondered, why can’t nested functions just be normal functions inside a namespace?
It seems silly to expose a tiny helper to the entire compilation unit when it is only meant to be used inside one function…
- wavemode 18d ago> why can’t nested functions just be normal functions inside a namespace Because GCC's nested functions are closures - they can access local variables within the function.