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

Compiler error with Visual Studio 2017 due to trying to mix c++17 and yaml-cpp-0.5.3 #40

Open
gurka opened this issue Feb 25, 2019 · 1 comment

Comments

@gurka
Copy link
Contributor

gurka commented Feb 25, 2019

When trying to build all targets in Visual Studio 2017 using yaml-cpp 0.5.3 an compiler error occurs in an yaml-cpp header that uses std::auto_ptr. std::auto_ptr is deprecated and was removed in c++17, and for some reason c++17 is used in the Visual Studio build:

set(CMAKE_CXX_STANDARD 17)

Not sure why c++17 is used here and c++14 used for other platforms.

Header with std::auto_ptr: https://github.com/jbeder/yaml-cpp/blob/yaml-cpp-0.5.3/include/yaml-cpp/parser.h#L43

@spec-chum
Copy link

spec-chum commented Feb 26, 2019

Cool, didn't notice the c++17 flag.

I added _HAS_AUTO_PTR_ETC=1 to the Preprocessor Definitions, which also fixes this error.

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

Successfully merging a pull request may close this issue.

2 participants