- New CMake based build system. Based in part on contribution from
Igor Okulist and Damien Buhl (Patch #14). Added support for running
tests and building with DLL on Windows.
- added missing JSON_API
- Visual Studio DLL: suppressed warning "C4251: <data member>: <type>
needs to have dll-interface to be used by..." via pragma push/pop
in json-cpp headers.
- New header json/version.h now contains version number macros
(JSONCPP_VERSION_MAJOR, JSONCPP_VERSION_MINOR, JSONCPP_VERSION_PATCH
and JSONCPP_VERSION_HEXA). While this header is generated by CMake,
it is committed to ease build with alternate build system
(CMake only update the file when it changes avoid issues with VCS).
diff --git a/include/json/writer.h b/include/json/writer.h
index 46d5ccc..23ebd50 100644
--- a/include/json/writer.h
+++ b/include/json/writer.h
@@ -12,6 +12,13 @@
# include <vector>
# include <string>
+// Disable warning C4251: <data member>: <type> needs to have dll-interface to be used by...
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+# pragma warning(push)
+# pragma warning(disable:4251)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
+
namespace Json {
class Value;
@@ -183,10 +190,14 @@
/// \brief Output using the StyledStreamWriter.
/// \see Json::operator>>()
- std::ostream& operator<<( std::ostream&, const Value &root );
+ JSON_API std::ostream& operator<<( std::ostream&, const Value &root );
} // namespace Json
+#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+# pragma warning(pop)
+#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING)
+
#endif // JSON_WRITER_H_INCLUDED