Hacker News new | ask | show | jobs
by sriram_sun 2795 days ago
#define ID(x) []() constexpr { return x; }

Interesting! Macro substitutions can expand to anything of course. I hadn't really considered adding lambda functions to that list.

1 comments

I'm looking forward to C++-20 when this is not needed anymore :-) - it will support string literals as non-type template parameters.