Re:Lambda expression comparison between C++11, C++14 and C++17
by meshko on Saturday May 14, 2016 @09:53PM
(#11698995)
Nice. I am a bit confused -- before c++17 it is impossible to capture this by copy; is it possible to capture other objects by copy? seems like it is?
[ Parent
| on HN ]
Re:Lambda expression comparison between C++11, C++14 and C++17
by Kristine1975 on Sunday May 15, 2016 @01:29AM
(#11699574)
Yes, it is. Just write:
[a](...){ ... }
and the variable "a" will be captured by copy.