id summary reporter owner description type status milestone component version severity resolution keywords cc 13393 [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda Tobias Loew Lorenzo Caminiti "Hi, starting from Boost version 1.65 and using VS 2015 Update 3 (MSVC 19.00) the following code int main() { auto check_property = []() { int test = 0; BOOST_SCOPE_EXIT(test) { test = 42; }BOOST_SCOPE_EXIT_END }; return 0; } raises an internal compiler error: fatal error C1001: An internal error has occurred in the compiler. (compiler file 'msc1.cpp', line 1468). With earlier Boost versions it compiles fine. I figured out that the problem is in . Since commit 12e1fe615a34c9a5e6ebe3ddf629c6491a50aa9d (DanielaE committed on Apr 14, 2017) in line 214 ff VS 2015 (w/o explicit #defines) includes . Before the commit VS 2015 included . It seems that VS 2015 has problems in lambda when is included. Unfortunately, the only way getting back the old behavior was defining BOOST_NO_CXX11_DECLTYPE or BOOST_NO_CXX11_TEMPLATE_ALIASES, but this would have major side-effects. I would propose a new macro called BOOST_TYPEOF_MSVC_NATIVE such that when defined is included. A working solution is replacing lin 18 in by #if !defined(BOOST_TYPEOF_MSVC_NATIVE) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_TYPEOF_EMULATION) Tobias" Bugs closed To Be Determined scope_exit Boost 1.65.0 Problem fixed