Added unit tests for complex and bitset

Made all template functions for the various types inline
This commit is contained in:
Shane Grant
2013-06-16 11:31:59 -07:00
parent 0c56175a1c
commit e2d07a1670
15 changed files with 152 additions and 55 deletions

View File

@@ -9,7 +9,7 @@ namespace cereal
namespace stack_detail
{
//! Allows access to the protected container in stack
template <class T, class C>
template <class T, class C> inline
C const & container( std::stack<T, C> const & stack )
{
struct H : public std::stack<T, C>
@@ -25,14 +25,14 @@ namespace cereal
}
//! Saving for std::stack to binary
template <class T, class C>
template <class T, class C> inline
void save( BinaryOutputArchive & ar, std::stack<T, C> const & stack )
{
ar & stack_detail::container( stack );
}
//! Loading for std::stack to binary
template <class T, class C>
template <class T, class C> inline
void load( BinaryInputArchive & ar, std::stack<T, C> & stack )
{
C container;