diff --git a/include/simdjson.h b/include/simdjson.h index 2dc55de00..6b2db98d3 100644 --- a/include/simdjson.h +++ b/include/simdjson.h @@ -14,6 +14,7 @@ SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(_MSC_VER) && defined(__clang__) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif +SIMDJSON_DISABLE_DEPRECATED_WARNING // Public API #include "simdjson/simdjson_version.h" diff --git a/include/simdjson/inline/parsedjson_iterator.h b/include/simdjson/inline/parsedjson_iterator.h index dad892187..5e8c70d2f 100644 --- a/include/simdjson/inline/parsedjson_iterator.h +++ b/include/simdjson/inline/parsedjson_iterator.h @@ -5,12 +5,6 @@ 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 { return location < tape_length; } @@ -477,8 +471,6 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer, return found; } -SIMDJSON_POP_DISABLE_WARNINGS - } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H diff --git a/src/simdjson.cpp b/src/simdjson.cpp index 3218ca283..686e1acfe 100644 --- a/src/simdjson.cpp +++ b/src/simdjson.cpp @@ -1,11 +1,14 @@ #include "simdjson.h" +SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif - +SIMDJSON_DISABLE_DEPRECATED_WARNING #include "error.cpp" #include "implementation.cpp" #include "stage1_find_marks.cpp" #include "stage2_build_tape.cpp" + +SIMDJSON_POP_DISABLE_WARNINGS