Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable MPARK_CPP14_CONSTEXPR for MSVC <= 19.15 #49

Merged
merged 1 commit into from Oct 2, 2018

Conversation

@mrkline
Copy link
Contributor

@mrkline mrkline commented Aug 28, 2018

The latest Visual Studio 2017 update (version 15.8, MSVC 19.15)
claims to support C++14 constexpr, but it does not. Compiling with
MPARK_CPP14_CONSTEXPR defined emits a litany of errors, e.g.,

5>c:\...\variant\include\mpark\variant.hpp(386): error C2131: expression did not evaluate to a constant
5>c:\...\variant\include\mpark\variant.hpp(386): note: failure was caused by a read of a variable outside its lifetime
5>c:\...\variant\include\mpark\variant.hpp(386): note: see usage of '<traits_0>'
5>c:\...\variant\include\mpark\variant.hpp(1205): note: see reference to class template instantiation 'mpark::detail::traits<Redacted, Lol>' being compiled
5>c:\...\variant\include\mpark\variant.hpp(1504): note: see reference to class template instantiation 'mpark::detail::impl<Redacted, Lol>' being compiled

Disable MPARK_CPP14_CONSTEXPR for this and previous versions of MSVC,
with the hope that this problem is addressed in the near future.

Fixes #48

The latest Visual Studio 2017 update (version 15.8, MSVC 19.15)
claims to support C++14 constexpr, but it does not. Compiling with
MPARK_CPP14_CONSTEXPR defined emits a litany of errors, e.g.,

    5>c:\...\variant\include\mpark\variant.hpp(386): error C2131: expression did not evaluate to a constant
    5>c:\...\variant\include\mpark\variant.hpp(386): note: failure was caused by a read of a variable outside its lifetime
    5>c:\...\variant\include\mpark\variant.hpp(386): note: see usage of '<traits_0>'
    5>c:\...\variant\include\mpark\variant.hpp(1205): note: see reference to class template instantiation 'mpark::detail::traits<Redacted, Lol>' being compiled
    5>c:\...\variant\include\mpark\variant.hpp(1504): note: see reference to class template instantiation 'mpark::detail::impl<Redacted, Lol>' being compiled

Disable MPARK_CPP14_CONSTEXPR for this and previous versions of MSVC,
with the hope that this problem is addressed in the near future.

Fixes #48
@mrkline
Copy link
Contributor Author

@mrkline mrkline commented Aug 29, 2018

Hm, the CI failures seem spurious... is that normal?

@mpark
Copy link
Owner

@mpark mpark commented Aug 30, 2018

Hm.. I need to take a look at the Travis CI. It seems to have been failing with a minor version update or something. Thanks for the patch!

@patrikhuber
Copy link

@patrikhuber patrikhuber commented Sep 23, 2018

Hi! It would be great to see an update on this PR - I'm also affected by this, and more people in #48, basically everyone that has updated to VS 15.8.

@patrikhuber
Copy link

@patrikhuber patrikhuber commented Oct 2, 2018

By the way I think a slight improvement to this PR could be made: MSVC 19.11 up to 19.14 actually worked, it was only 19.15 where this broke. So I think MPARK_CPP14_CONSTEXPR could still be enabled, except for 19.15. But not sure it's worth it, since usually people should just be on the latest minor VS version anyway.

patrikhuber added a commit to patrikhuber/eos that referenced this pull request Oct 2, 2018
Applied the changes from mpark/variant#49.
This also disables `MPARK_CPP14_CONSTEXPR` for MSVC <19.15, where it actually worked - but that's ok.
patrikhuber added a commit to patrikhuber/eos that referenced this pull request Oct 2, 2018
Applied the changes from mpark/variant#49.
This also disables `MPARK_CPP14_CONSTEXPR` for MSVC <19.15, where it actually worked - but that's ok.
@mpark mpark merged commit c8a24a1 into mpark:master Oct 2, 2018
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@mpark
Copy link
Owner

@mpark mpark commented Jan 14, 2019

Fixed the root cause in 657110d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.