Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda
I figured out that the problem is in <boost/typeof/typeof.hpp>.
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 <boost/typeof/native.hpp>.
It seems that VS 2015 has problems in lambda when
<boost/typeof/decltype.hpp> 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 <boost/typeof/native.hpp> is included.
I will also send a bug report to MS, but I do not think they will do any more
fixes for VS 2015. I made a pull-request
<https://github.com/boostorg/typeof/pull/11> in boost/typeof that
reenables pre 1.65 behaviour for MSVC <= 1900