User profile: Peter87

User info
User name:Peter87
Website:http://dataapa.net/
History
Joined:
Number of posts:11189
Latest posts:

Unlock mutex when returning
[quote]I'm not sure of the order of events here - is the caller accessing the data after the mutex i...

Segmentation fault (core dumped)
Compile the program with [tt]-g[/tt] for better valgrind error messages.

What is the difference between declaring a variable auto and declaring it auto&&?
No, lifetime extension only apply when you bind it directly to the temporary. My mental model is tha...

What is the difference between declaring a variable auto and declaring it auto&&?
[quote=keskiverto]Such reference has to be const?[/quote] Non-const rvalue references also extend th...

What is the difference between declaring a variable auto and declaring it auto&&?
[code]other[/code] is a reference. If [code]f()[/code] returns a reference you'll need to be careful...