News for hackers. Stuff that matters.
Re:John Carmack on Inlined Code (2014) by honkhonkpants on Tuesday July 19, 2016 @11:02AM (#12122165)
C++11 has given us a new and wonderful world of this small function debugging horror, since we can now gin up lambda functors that have no name, that have a type with no known name, and don't play well with the debugger (good luck figuring out why your program is spending all of its time in "operator()").
Re:John Carmack on Inlined Code (2014) by AstralStorm on Tuesday July 19, 2016 @12:20PM (#12122618)
Even relatively old generally and lldb show location information correctly for lambdas.

Templates are usually more of a pain to debug.

Re:John Carmack on Inlined Code (2014) by honkhonkpants on Tuesday July 19, 2016 @12:36PM (#12122731)
How do you mean they show them correctly? Perhaps you are right but I often see them attributed to std::function::operator() in the header <functional>, because someone has assigned the lambda to a class member field or function argument of type std::function. When the function has more than one caller it can be a nuisance trying to figure out which caller's lambda is the one being called. The only way I know of to identify them is to examine the full template expansion which is often a kilobyte of metaprogram gibberish.
Re:John Carmack on Inlined Code (2014) by robotresearcher on Tuesday July 19, 2016 @01:42PM (#12123324)
Can you not see the call stack for your lambda, as for any function?