Fix MSVC 19.28+ issue with ByEdgeOrByMeterValue::by_edge and ByEdgeOrByMeterValue::by_meter definitions#6156
Merged
akashihi merged 2 commits intoProject-OSRM:masterfrom Nov 13, 2021
mloskot:ml/fix-msvc-19-28-static-const-member
Merged
Fix MSVC 19.28+ issue with ByEdgeOrByMeterValue::by_edge and ByEdgeOrByMeterValue::by_meter definitions#6156akashihi merged 2 commits intoProject-OSRM:masterfrom mloskot:ml/fix-msvc-19-28-static-const-member
akashihi merged 2 commits intoProject-OSRM:masterfrom
mloskot:ml/fix-msvc-19-28-static-const-member
Conversation
…ByMeterValue::by_meter definitions This is a workaround for discrepancy between MSVC 19.27 and 19.28 about static const member definition https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338 We can not use C++17 inline variable as a workaround suggested in the issue report linked above, because the sol2 does not seem to compile in C++17 mode: third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of...
mloskot
added a commit
to Cadcorp/osrm-backend
that referenced
this pull request
Nov 12, 2021
…st member definition https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338 NOTE: We can not use C++17 inline variable as a workaround suggesed in the issue report, because sol2 does not compile in C++17 mode: third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of... So, we still build osrm-backend as C++14. This fix was proposed to upstream Project-OSRM#6156 (cherry picked from commit 0754ef5 in cadcorp/5.25 branch)
akashihi
approved these changes
Nov 13, 2021
mloskot
added a commit
to Cadcorp/osrm-backend
that referenced
this pull request
Mar 16, 2022
…st member definition https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338 NOTE: We can not use C++17 inline variable as a workaround suggesed in the issue report, because sol2 does not compile in C++17 mode: third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of... So, we still build osrm-backend as C++14. This fix was proposed to upstream Project-OSRM#6156 (cherry picked from commit 0754ef5 in cadcorp/5.25 branch)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
This is a workaround for discrepancy between MSVC 19.27 and 19.28
about static const member definition
https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338
Building Debug configuration with MSVC 19.28+ fails with:
We can not use C++17 inline variable as a workaround suggested
in the issue report linked above, because the sol2 does not
seem to compile in C++17 mode:
Tasklist