diff ext/json11/json11.hpp @ 247:8a031eb9a25f

Merge branch 'output-type-uri'
author Chris Cannam <cannam@all-day-breakfast.com>
date Thu, 15 Jun 2017 09:52:01 +0100
parents d607ae858682
children
line wrap: on
line diff
--- a/ext/json11/json11.hpp	Mon May 22 08:57:02 2017 +0100
+++ b/ext/json11/json11.hpp	Thu Jun 15 09:52:01 2017 +0100
@@ -56,6 +56,18 @@
 #include <memory>
 #include <initializer_list>
 
+#ifdef _MSC_VER
+    #if _MSC_VER <= 1800 // VS 2013
+        #ifndef noexcept
+            #define noexcept throw()
+        #endif
+
+        #ifndef snprintf
+            #define snprintf _snprintf_s
+        #endif
+    #endif
+#endif
+
 namespace json11 {
 
 enum JsonParse {
@@ -165,9 +177,18 @@
     // Parse multiple objects, concatenated or separated by whitespace
     static std::vector<Json> parse_multi(
         const std::string & in,
+        std::string::size_type & parser_stop_pos,
         std::string & err,
         JsonParse strategy = JsonParse::STANDARD);
 
+    static inline std::vector<Json> parse_multi(
+        const std::string & in,
+        std::string & err,
+        JsonParse strategy = JsonParse::STANDARD) {
+        std::string::size_type parser_stop_pos;
+        return parse_multi(in, parser_stop_pos, err, strategy);
+    }
+
     bool operator== (const Json &rhs) const;
     bool operator<  (const Json &rhs) const;
     bool operator!= (const Json &rhs) const { return !(*this == rhs); }