Home Dashboard Directory Help

[Visual C++] Intellisense bug with create_async by Simon FERQUEL


 as Deferred Help for as Deferred

Sign in
to vote
Type: Bug
ID: 771931
Opened: 11/22/2012 3:03:43 AM
Access Restriction: Public
User(s) can reproduce this bug


I found a bug in the VC11 IntelliSense when mixing tasks and IAsyncOperations<T>^. Here is the code snippet that produce an IntelliSense error (but compile / run successfully):

IAsyncOperation<FileReadWriteProxy^>^ FileReadWriteProxy::FromFile(IStorageFile^ file, uint64 contentSize, uint64 alreadyWrittenLength, uint32 readBufferSize, Platform::String^ identity)
    task<FileReadWriteProxy^> task = create_task(file->OpenAsync(FileAccessMode::ReadWrite))
        .then([=](IRandomAccessStream^ fileStream)

        return ref new FileReadWriteProxy(file, fileStream, contentSize, alreadyWrittenLength, readBufferSize, identity);
    IAsyncOperation<FileReadWriteProxy^>^ asyncOp = create_async([=]{return task;});
    return asyncOp;

The error refers to the line "IAsyncOperation<FileReadWriteProxy^>^ asyncOp = create_async([=]{return task;});".
Sign in to post a comment.
Posted by Microsoft on 11/27/2012 at 12:52 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 11/22/2012 at 6:02 PM
Thanks for your feedback.

In order to fix the issue, we must first reproduce the issue in our labs. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a simple repro project so that we can conduct further research?

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 11/22/2012 at 3:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.