Home Dashboard Directory Help
Search

Compiler bug - cannot access private member declared in class by JamesWebb


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 682454
Opened: 7/31/2011 5:02:20 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

This code works in gcc v4.5.2 but not in vs2010 sp1

Code From: http://pizer.wordpress.com/2008/11/22/scope-guards-revisited-c0x-style/

error C2248: 'scope_guard_with_functor<F>::scope_guard_with_functor' : cannot access private member declared in class 'scope_guard_with_functor<F>'
with
[
    F=void (__cdecl *)(void)
]
c:\src\scoped\scoped_test_4\scoped_test_4.cpp(29) : see declaration of 'scope_guard_with_functor<F>::scope_guard_with_functor'
with
[
    F=void (__cdecl *)(void)
]
Details
Sign in to post a comment.
Posted by Microsoft on 8/13/2011 at 6:31 PM
Hi: this bug has been fixed and the fix will show up in a future release of Visual C++

Thanks
Jonathan Caves
Visual C++ Compiler Team
Posted by MS-Moderator09 [Feedback Moderator] on 7/31/2011 at 9:29 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 7/31/2011 at 5:48 PM
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.
File Name Submitted By Submitted On File Size  
Scoped_Test_4.cpp 7/31/2011 1 KB