Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question"connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress3-Feb-24 15:01
Salvatore Terress3-Feb-24 15:01 
SuggestionRe: "connect" with "lambda" C++ code analysis , please. Pin
k50543-Feb-24 15:55
mvek50543-Feb-24 15:55 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress3-Feb-24 16:44
Salvatore Terress3-Feb-24 16:44 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
k50544-Feb-24 4:34
mvek50544-Feb-24 4:34 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress4-Feb-24 4:49
Salvatore Terress4-Feb-24 4:49 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
k50544-Feb-24 5:30
mvek50544-Feb-24 5:30 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress4-Feb-24 13:36
Salvatore Terress4-Feb-24 13:36 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
k50545-Feb-24 4:25
mvek50545-Feb-24 4:25 
Salvatore Terress wrote:
I have modified the code because i
CANNOT debug / step thru the lambda code !

That does seem to be an issue with lambdas - at least gdb doesn't seem to be able to step into lambdas. I haven't tried it myself, so I can only go by what I've seen elsewhere on the subject.

But.

Why don't you just extract the function definition from the lambda and define it as a normal function. I think that should work
C++
foo( a, b, c, [](int x, int y) { /*  do something; */ return val; } );
becomes
C++
int lambda_f( int x, int y)
{
   // body from lambda called in foo(), above
   return val;
}

// ...
foo(a, b, c lambda_f); 
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown

GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress5-Feb-24 6:30
Salvatore Terress5-Feb-24 6:30 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Richard MacCutchan4-Feb-24 6:16
mveRichard MacCutchan4-Feb-24 6:16 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
jschell5-Feb-24 5:33
jschell5-Feb-24 5:33 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress5-Feb-24 6:38
Salvatore Terress5-Feb-24 6:38 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
k50545-Feb-24 7:10
mvek50545-Feb-24 7:10 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
jschell6-Feb-24 4:40
jschell6-Feb-24 4:40 
Questionstrlen innards Pin
mike74112-Feb-24 12:02
mike74112-Feb-24 12:02 
AnswerRe: strlen innards Pin
Richard MacCutchan2-Feb-24 21:52
mveRichard MacCutchan2-Feb-24 21:52 
AnswerRe: strlen innards Pin
jschell5-Feb-24 5:58
jschell5-Feb-24 5:58 
QuestionMissing "type specifier " ? Pin
Salvatore Terress2-Feb-24 5:37
Salvatore Terress2-Feb-24 5:37 
AnswerRe: Missing "type specifier " ? Pin
Mircea Neacsu2-Feb-24 5:52
Mircea Neacsu2-Feb-24 5:52 
AnswerRe: Missing "type specifier " ? Pin
jschell2-Feb-24 5:53
jschell2-Feb-24 5:53 
GeneralRe: Missing "type specifier " ? Pin
k50542-Feb-24 7:28
mvek50542-Feb-24 7:28 
AnswerRe: Missing "type specifier " ? Pin
RedDk2-Feb-24 7:39
RedDk2-Feb-24 7:39 
GeneralRe: Missing "type specifier " ? Pin
Salvatore Terress2-Feb-24 8:02
Salvatore Terress2-Feb-24 8:02 
GeneralRe: Missing "type specifier " ? Pin
Salvatore Terress2-Feb-24 9:05
Salvatore Terress2-Feb-24 9:05 
GeneralRe: Missing "type specifier " ? Pin
Mircea Neacsu2-Feb-24 10:44
Mircea Neacsu2-Feb-24 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.