3 ms·
Generate a large number of strings and maps programmatically in compile time. You are pretty much limited to macros and macro-like languages (llvm-tablegen) if
by fooker 3y ago
Generate a large number of strings and maps programmatically in compile time.
You are pretty much limited to macros and macro-like languages (llvm-tablegen) if you want to do this today.
- mostlylurks 3y agoYou can also do the same with templates quite easily, but the resulting compile times are going to be absolutely atrocious.
- fooker 3y agoA bunch of constexpr stuff since C++14 onwards have been added just to make meta-programming more usable. Users, library writers, and compiler writers all benefit from this in some way.
- deleted 3y ago[deleted]
- ghotli 3y agoMaybe I'm just not imaginative enough but what sort of use-case is this sort of thing for?
- fooker 3y agoParsers, and any text heavy application really.