diff --git a/.gitignore b/.gitignore index 8136e4c3f..8ffe8b8eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +visual_studio + /benchbranch/ /submodules/ diff --git a/include/simdjson/simdjson.h b/include/simdjson/simdjson.h index 362485331..8cabc6bef 100644 --- a/include/simdjson/simdjson.h +++ b/include/simdjson/simdjson.h @@ -1,6 +1,22 @@ #ifndef SIMDJSON_SIMDJSON_H #define SIMDJSON_SIMDJSON_H +#ifndef __cplusplus +#error SIMDBJSON requires C++ compiler +#endif + +#ifndef SIMDJSON_CPLUSPLUS +#if defined(_MSVC_LANG) && !defined(__clang__) +#define SIMDJSON_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG) +#else +#define SIMDJSON_CPLUSPLUS __cplusplus +#endif +#endif + +#if (SIMDJSON_CPLUSPLUS < 201703L) +#error SIMDBJSON requires the standard C++17 compiler +#endif + #include namespace simdjson {