mirror of
https://github.com/RPCS3/cereal.git
synced 2024-11-27 13:10:43 +00:00
e2d07a1670
Made all template functions for the various types inline
34 lines
717 B
C++
34 lines
717 B
C++
#ifndef CEREAL_BINARY_ARCHIVE_DEQUE_HPP_
|
|
#define CEREAL_BINARY_ARCHIVE_DEQUE_HPP_
|
|
|
|
#include <cereal/binary_archive/binary_archive.hpp>
|
|
#include <deque>
|
|
|
|
namespace cereal
|
|
{
|
|
//! Saving for std::deque to binary
|
|
template <class T, class A> inline
|
|
void save( BinaryOutputArchive & ar, std::deque<T, A> const & deque )
|
|
{
|
|
ar & deque.size();
|
|
|
|
for( auto const & i : deque )
|
|
ar & i;
|
|
}
|
|
|
|
//! Loading for std::deque to binary
|
|
template <class T, class A> inline
|
|
void load( BinaryInputArchive & ar, std::deque<T, A> & deque )
|
|
{
|
|
size_t size;
|
|
ar & size;
|
|
|
|
deque.resize( size );
|
|
|
|
for( auto & i : deque )
|
|
ar & i;
|
|
}
|
|
} // namespace cereal
|
|
|
|
#endif // CEREAL_BINARY_ARCHIVE_DEQUE_HPP_
|