Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I didn't find a way to do this in plain C

Not sure what you were running into. I routinely do this just fine.

> This didn't even use constexpr, just preprocessor trickery.

Isn't the preprocessor shared between C and C++?

> in C++ you can initialize a global struct and it gets statically linked into the output

That sounds to be doable just the same in C?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: