4 ms·
I've been asked to explain the following in c++ [](){}(); This doesn't test your programming skills either
by gbronner 6y ago
I've been asked to explain the following in c++
[](){}();
This doesn't test your programming skills either
- colejohnson66 6y agoI’m gonna hazard a guess and say (based on the brackets at the beginning), it’s something about a lambda with no capture group? Regardless, what’s the point in asking people how bad practice code works? Why would anyone write a lambda that does absolutely nothing?
- mbrodersen 6y agoIt’s a do-nothing lambda expression applied (executed). If it is one of many questions then it does help revealing what you know and don’t know.
- Turing_Machine 6y agoWhat this would reveal to me is that I know that I have no interest in working for a company that thinks this is a reasonable interview question.
- Turing_Machine 6y agoException: if the job were for a compiler engineer who needs to know how to handle even the most pathological cases, then it might be reasonable.