[scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
Hi,

starting from Boost version 1.65 and using VS 2015 Update 3 (MSVC 19.00) the
following code



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.

Tobias



--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
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
<boost/typeof/decltype.hpp>.
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.

Tobias



--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
Sorry, the code is missing in the above post:



--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
And again, here's the code:

int main() {
    auto check_property = []() {
        int test = 0;
        BOOST_SCOPE_EXIT(test) {
            test = 42;
        }BOOST_SCOPE_EXIT_END
    };

    return 0;
}







--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
On Fri, Jan 12, 2018 at 10:38 AM, Tobias Loew via Boost
<[hidden email]> wrote:

> And again, here's the code:
>
> int main() {
>     auto check_property = []() {
>         int test = 0;
>         BOOST_SCOPE_EXIT(test) {
>             test = 42;
>         }BOOST_SCOPE_EXIT_END
>     };
>
>     return 0;
> }

Have you filed a bug report with MS?


--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
I've added a  ticket <https://svn.boost.org/trac10/ticket/13393#ticket>  




--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
On Fri, Jan 12, 2018 at 11:55 AM, Tobias Loew via Boost
<[hidden email]> wrote:
> I've added a  ticket <https://svn.boost.org/trac10/ticket/13393#ticket>

I don't think Microsoft is tracking our Trac..


--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
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



--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [scope_exit] (Boost >= 1.65) VS 2015 internal compiler error in lambda

Boost - Dev mailing list
Tobias Loew wrote:

> I made a  pull-request <https://github.com/boostorg/typeof/pull/11> in
> boost/typeof that reenables pre 1.65 behaviour for MSVC <= 1900

It will be very helpful if you couple this fix with a test that demonstrates
the breakage (that is, a test that fails before the fix and passes after the
fix.)


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost