News for hackers. Stuff that matters.
Re:Just how constexpr is C++20’s std:string? by fooker on Friday September 08, 2023 @03:58PM (#37438642)
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.

Re:Just how constexpr is C++20’s std:string? by mostlylurks on Friday September 08, 2023 @04:19PM (#37438883)
You can also do the same with templates quite easily, but the resulting compile times are going to be absolutely atrocious.
Re:Just how constexpr is C++20’s std:string? by fooker on Friday September 08, 2023 @05:26PM (#37439654)
A 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.

Re:Just how constexpr is C++20’s std:string? by ghotli on Friday September 08, 2023 @09:20PM (#37441247)
Maybe I'm just not imaginative enough but what sort of use-case is this sort of thing for?
Re:Just how constexpr is C++20’s std:string? by fooker on Saturday September 09, 2023 @06:59PM (#37451136)
Parsers, and any text heavy application really.