C++/CX questions from store app tutorial


  • I am going though the tutorial here http://msdn.microsoft.com/en-us/library/windows/apps/hh465045.aspx

    There are a couple of things I just don't "get".

    1) What is the [this] referring to here? I've seen other examples where then() is called with a blank set of brackets i.e. create_task(thingOp).then([] (blah^ thing)-> thing^

    Is [] being used here as a typecast for a function or something?

    create_task(feedOp).then([this] (SyndicationFeed^ feed) -> SyndicationFeed^    {

    2) Why is RetrieveFeedAsync called and assigning to the same feedOp variable twice? Looking at the documentation for RetrieveFeedAsync I see that it instantiates a SyndicationFeed object which I assume would be the purpose of the first call. But, then you call it again? My guess is that this second call relates to the RetrievalProgress.

    auto feedOp = client->RetrieveFeedAsync(feedUri); feedOp = client->RetrieveFeedAsync(feedUri);

    Any suggestion on where to look to get a better handle on this stuff?


    Thursday, April 11, 2013 9:12 PM


All replies