3 ms·
I thought about lambdas before I wrote my answer but I thought decltype was and is more conventionally used for that purpose?
by jimbob45 6y ago
I thought about lambdas before I wrote my answer but I thought decltype was and is more conventionally used for that purpose?
- MauranKilom 6y agoCan you elaborate what you envision there? For reference, a lambda in C++ might look like this: auto sqr = [](double val) { return val * val; }; (The lambda expression is technically only the part after the =, but storing it into a variable is common enough). How would you use decltype here?