Home Dashboard Directory Help
Search

Unexpected error C2871 reported at 'using namespace' directive before a lambda expression by slide_b


Status: 

Closed
 as Fixed Help for as Fixed


3
0
Sign in
to vote
Type: Bug
ID: 644190
Opened: 2/15/2011 7:02:25 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The folowing code:

namespace NamespaceA {
    namespace NamespaceB{
    }
}

int main(){
    using namespace NamespaceA::NamespaceB;
    auto a = []() {};
    return 0;
}

generates this error:
error C2871: 'NamespaceB' : a namespace with this name does not exist

The error is reported at 'auto a = []() {};' line.
Details
Sign in to post a comment.
Posted by Microsoft on 2/28/2011 at 7:25 PM
Hello,

Thank you for reporting this issue. We are aware of this bug and have fixed it in the current release we're working shipping next. Please expect this bug to be fixed in the next major release of Visual Studio. Thank you again for taking the time to report this bug.

Thanks,
Ulzii Luvsanbat
Windows C++ Team
Posted by Microsoft on 2/15/2011 at 6:25 PM
Thanks for your feedback.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 2/15/2011 at 7:13 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.