MSVC JSON minimal fixes

MSVC 2013 couldn't handle the boolean expression used in some SFINAE tests - was treating a three-way OR with one true value as false.  This fixes #217
This commit is contained in:
Shane Grant
2015-09-09 22:25:15 -07:00
parent b849a39950
commit f45109083f
+4 -4
View File
@@ -753,7 +753,7 @@ namespace cereal
that may be given data by the type about to be archived
Minimal types do not start or finish nodes */
template <class T, traits::DisableIf<std::is_arithmetic<T>::value ||
template <class T, traits::DisableIf<(std::is_arithmetic<T>::value) ||
traits::has_minimal_base_class_serialization<T, traits::has_minimal_output_serialization, JSONOutputArchive>::value ||
traits::has_minimal_output_serialization<T, JSONOutputArchive>::value> = traits::sfinae>
inline void prologue( JSONOutputArchive & ar, T const & )
@@ -762,7 +762,7 @@ namespace cereal
}
//! Prologue for all other types for JSON archives
template <class T, traits::DisableIf<std::is_arithmetic<T>::value ||
template <class T, traits::DisableIf<(std::is_arithmetic<T>::value) ||
traits::has_minimal_base_class_serialization<T, traits::has_minimal_input_serialization, JSONInputArchive>::value ||
traits::has_minimal_input_serialization<T, JSONInputArchive>::value> = traits::sfinae>
inline void prologue( JSONInputArchive & ar, T const & )
@@ -775,7 +775,7 @@ namespace cereal
/*! Finishes the node created in the prologue
Minimal types do not start or finish nodes */
template <class T, traits::DisableIf<std::is_arithmetic<T>::value ||
template <class T, traits::DisableIf<(std::is_arithmetic<T>::value) ||
traits::has_minimal_base_class_serialization<T, traits::has_minimal_output_serialization, JSONOutputArchive>::value ||
traits::has_minimal_output_serialization<T, JSONOutputArchive>::value> = traits::sfinae>
inline void epilogue( JSONOutputArchive & ar, T const & )
@@ -784,7 +784,7 @@ namespace cereal
}
//! Epilogue for all other types other for JSON archives
template <class T, traits::DisableIf<std::is_arithmetic<T>::value ||
template <class T, traits::DisableIf<(std::is_arithmetic<T>::value) ||
traits::has_minimal_base_class_serialization<T, traits::has_minimal_input_serialization, JSONInputArchive>::value ||
traits::has_minimal_input_serialization<T, JSONInputArchive>::value> = traits::sfinae>
inline void epilogue( JSONInputArchive & ar, T const & )