Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@InBetweenNames
Copy link
Contributor

This prevents multiple definition errors in Clang,
and also stops dllexporting functions with internal
linkage. Degrades gracefully when C++17 is not
present. Tested on MSVC 2017 and LLVM on Windows.
Also fix a few _MSC_VER tests to only apply for non-recent
versions of MSVC 2017 and below.

Fix #595
Fix #652
Fix #582
Fix #643

@InBetweenNames
Copy link
Contributor Author

Made a small mistake with #if, now correctly checks for defined(_MSC_VER) instead of blindly comparing the version number.

@InBetweenNames
Copy link
Contributor Author

Interesting. It seems like Clang 5 has a bug with inline variables that was fixed in later versions. It seems that there are two ways forward: we could remove the test or we could adjust the CEREAL_HAS_CPP17 macro to specifically exclude Clang 5. What would be the best way to go forwards?

This prevents multiple definition errors in Clang,
and also stops dllexporting functions with internal
linkage.  Degrades gracefully when C++17 is not
present.

Fix USCiLab#595
Fix USCiLab#652
Fix USCiLab#582
Fix USCiLab#643
@InBetweenNames
Copy link
Contributor Author

Fix applied to exclude Clang 5.x from C++17 features

@breznak
Copy link

breznak commented Feb 20, 2021

Very nice fix, thank you! Any chance to get this merged soon?

@AzothAmmo AzothAmmo added the bug label May 5, 2021
@AzothAmmo AzothAmmo added this to the v1.3.1 milestone May 5, 2021
@AzothAmmo AzothAmmo merged commit 46a4a91 into USCiLab:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cereal compilation failure VS2019 with clang Type registration would not compile with clang on Windows

3 participants