This code works in gcc v4.5.2 but not in vs2010 sp1Code 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)]
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...