id summary reporter owner description type status milestone component version severity resolution keywords cc 10793 Compilation errors in Visual Studio 2013 with /Za (disabled extensions) adam.f.badura@… Lorenzo Caminiti "Use of Scope Exit generates compilation errors in Visual Studio 2013 (version 18.00.31101 for x86) if `/Za` option (disabled language extensions) is used. I haven't checked other VS versions. I haven't checked previous Boost versions. And `/Za` is not set by default (language extensions are enabled by default). With `BOOST_SCOPE_EXIT_ALL` we get following errors: {{{ C:\Users\Adam Badura\Dropbox\Projekty\scope_exit>cl /EHsc /Za /I""C:\Programming\boost_1_57_0"" BOOST_SCOPE_EXIT_ALL.cpp Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86 Copyright (C) Microsoft Corporation. All rights reserved. BOOST_SCOPE_EXIT_ALL.cpp C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2143: syntax error : missing ';' before '<' C:\Programming\boost_1_57_0\boost/scope_exit.hpp(427) : see reference to class template instantiation 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type' being compiled C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2913: explicit specialization; 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type::id2type_impl' is not a specialization of a class template C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2059: syntax error : '<' C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body }}} With `BOOST_SCOPE_EXIT` we get following errors: {{{ C:\Users\Adam Badura\Dropbox\Projekty\scope_exit>cl /EHsc /Za /I""C:\Programming\boost_1_57_0"" BOOST_SCOPE_EXIT.cpp Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86 Copyright (C) Microsoft Corporation. All rights reserved. BOOST_SCOPE_EXIT.cpp C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2143: syntax error : missing ';' before '<' C:\Programming\boost_1_57_0\boost/scope_exit.hpp(427) : see reference to class template instantiation 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type' being compiled C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2913: explicit specialization; 'boost::scope_exit::aux::msvc_typeof_this::msvc_extract_type::id2type_impl' is not a specialization of a class template C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2059: syntax error : '<' C:\Programming\boost_1_57_0\boost/scope_exit.hpp(419) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body BOOST_SCOPE_EXIT.cpp(9) : warning C4003: not enough actual parameters for macro 'BOOST_PP_EXPAND_I' }}} Note that in case of `BOOST_SCOPE_EXIT` we also get warning C4003. And it shows in clean build (without `/Za`) as well." Bugs reopened To Be Determined scope_exit Boost 1.65.0 Problem