const_cast for save(), seeking for binary_oarchive

Using const cast to get rid of having two versions of save (changed vector and array so far)

Initial implementation of seeking to allow saving and restoring position within a binary archive
This commit is contained in:
Shane Grant
2013-06-14 12:17:21 -07:00
parent 6821955323
commit e9d277025f
10 changed files with 114 additions and 37 deletions

View File

@@ -31,15 +31,6 @@ namespace cereal
ar & i;
}
//! Saving for non-const std::array all other types to binary
template <class T, size_t N>
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type
save( BinaryOutputArchive & ar, std::array<T, N> & array )
{
for( auto & i : array )
ar & i;
}
//! Loading for std::array all other types to binary
template <class T, size_t N>
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type