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

@@ -7,7 +7,7 @@
namespace cereal
{
//! Serialization for std::vectors of arithmetic (but not bool) types to binary
template <class T, class A>
template <class T, class A> inline
typename std::enable_if<std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, void>::type
save( BinaryOutputArchive & ar, std::vector<T, A> const & vector )
{
@@ -19,7 +19,7 @@ namespace cereal
}
//! Serialization for std::vectors of arithmetic (but not bool) types to binary
template <class T, class A>
template <class T, class A> inline
typename std::enable_if<std::is_arithmetic<T>::value && !std::is_same<T, bool>::value, void>::type
load( BinaryInputArchive & ar, std::vector<T, A> & vector )
{
@@ -34,7 +34,7 @@ namespace cereal
}
//! Serialization for non-arithmetic (and bool) vector types to binary
template <class T, class A>
template <class T, class A> inline
typename std::enable_if<!std::is_arithmetic<T>::value || std::is_same<T, bool>::value, void>::type
save( BinaryOutputArchive & ar, std::vector<T, A> const & vector )
{
@@ -44,7 +44,7 @@ namespace cereal
}
//! Serialization for non-arithmetic (and bool) vector types from binary
template <class T, class A>
template <class T, class A> inline
typename std::enable_if<!std::is_arithmetic<T>::value || std::is_same<T, bool>::value, void>::type
load( BinaryInputArchive & ar, std::vector<T, A> & vector )
{