3 ms·
#define ID(x) []() constexpr { return x; } Interesting! Macro substitutions can expand to anything of course. I hadn't really considered adding lambda function
by sriram_sun 8y 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.
- hogliux 8y agoI'm looking forward to C++-20 when this is not needed anymore :-) - it will support string literals as non-type template parameters.