diff --git a/CMakeLists.txt b/CMakeLists.txt index 046d7114..eab2b8d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) add_library(simdjson-flags INTERFACE) if(MSVC) target_compile_options(simdjson-flags INTERFACE /nologo) - target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4996 /wd4267 /wd4244) + target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4267 /wd4244) else() target_compile_options(simdjson-flags INTERFACE -fPIC) target_compile_options(simdjson-flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self) diff --git a/include/simdjson/inline/parsedjson_iterator.h b/include/simdjson/inline/parsedjson_iterator.h index cf4f2044..75a9c409 100644 --- a/include/simdjson/inline/parsedjson_iterator.h +++ b/include/simdjson/inline/parsedjson_iterator.h @@ -5,6 +5,10 @@ namespace simdjson { +// VS2017 reports deprecated warnings when you define a deprecated class's methods. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_DEPRECATED_WARNING + // Because of template weirdness, the actual class definition is inline in the document class WARN_UNUSED bool dom::parser::Iterator::is_ok() const { @@ -469,6 +473,8 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer, return found; } +SIMDJSON_POP_DISABLE_WARNINGS + } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H