Missing const on weak_ptr lock, addresses part of issue #43

This commit is contained in:
Shane Grant
2014-01-06 12:12:38 -08:00
parent 436a0a275c
commit b3527ffd0f
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ namespace cereal
typename std::enable_if<!std::is_polymorphic<T>::value, void>::type
save( Archive & ar, std::weak_ptr<T> const & ptr )
{
auto sptr = ptr.lock();
auto const sptr = ptr.lock();
ar( _CEREAL_NVP("ptr_wrapper", memory_detail::make_ptr_wrapper( sptr )) );
}
+4
View File
@@ -85,6 +85,10 @@
} } /* end namespaces */ \
CEREAL_BIND_TO_ARCHIVES(T)
#ifdef _MSC_VER
#undef CONSTEXPR
#endif
namespace cereal
{
namespace polymorphic_detail