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

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 682454 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 7/31/2011 5:02:20 PM
Access Restriction Public


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

Code From:

error C2248: 'scope_guard_with_functor<F>::scope_guard_with_functor' : cannot access private member declared in class 'scope_guard_with_functor<F>'
    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'
    F=void (__cdecl *)(void)
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++

Jonathan Caves
Visual C++ Compiler Team
Posted by EricLeong [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(