spack/var/spack/repos/builtin/packages/cereal/pointers.patch
2017-03-20 15:05:02 -05:00

20 lines
751 B
Diff

--- old/include/cereal/types/common.hpp
+++ new/include/cereal/types/common.hpp
@@ -106,14 +106,16 @@
t = reinterpret_cast<typename common_detail::is_enum<T>::type const &>( value );
}
+#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION
//! Serialization for raw pointers
/*! This exists only to throw a static_assert to let users know we don't support raw pointers. */
template <class Archive, class T> inline
void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & )
{
static_assert(cereal::traits::detail::delay_static_assert<T>::value,
"Cereal does not support serializing raw pointers - please use a smart pointer");
}
+#endif
//! Serialization for C style arrays
template <class Archive, class T> inline