halley icon indicating copy to clipboard operation
halley copied to clipboard

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

Open gurka opened this issue 6 years ago • 1 comments

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:

https://github.com/amzeratul/halley/blob/7d5731096013730eb7d4ea0278157b13c1b9cfec/cmake/HalleyProject.cmake#L69

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

gurka avatar Feb 25 '19 21:02 gurka

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

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

spec-chum avatar Feb 26 '19 21:02 spec-chum