I’m following this guide, and I’m hitting these parts of the code that include the term [this] (Just Ctrl-F it; you’ll see what I mean).
I’m not sure if this is a C++ thing or a C++/CX thing, but, either way, I don’t know what it is.
What is it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s called a “Lambda Closure” and it’s saying that the current instance (
this) is to be passed into the lambda body (enabling you to use it’s variables, and call it’s methods).This page gives a good summary of Lambda Closures:
http://www.cprogramming.com/c++11/c++11-lambda-closures.html