diff --git a/include/cereal/archives/json.hpp b/include/cereal/archives/json.hpp index 68237216..eb09b6e5 100644 --- a/include/cereal/archives/json.hpp +++ b/include/cereal/archives/json.hpp @@ -601,6 +601,9 @@ namespace cereal //! Loads a value from the current node - string overload void loadValue(std::string & val) { search(); val = itsIteratorStack.back().value().GetString(); ++itsIteratorStack.back(); } + // Special cases to handle various flavors of long, which tend to conflict with + // the int32_t or int64_t on various compiler/OS combinations. MSVC doesn't need any of this. + #ifndef _MSC_VER private: //! 32 bit signed long loading from current node template inline @@ -621,9 +624,8 @@ namespace cereal template inline typename std::enable_if::value, void>::type loadLong(T & lu){ loadValue( reinterpret_cast( lu ) ); } - + public: - #ifndef _MSC_VER //! Serialize a long if it would not be caught otherwise template inline typename std::enable_if::value &&