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
{
//! Saving for std::array primitive types to binary
template <class T, size_t N>
template <class T, size_t N> inline
typename std::enable_if<std::is_arithmetic<T>::value, void>::type
save( BinaryOutputArchive & ar, std::array<T, N> const & array )
{
@@ -15,7 +15,7 @@ namespace cereal
}
//! Loading for std::array primitive types to binary
template <class T, size_t N>
template <class T, size_t N> inline
typename std::enable_if<std::is_arithmetic<T>::value, void>::type
load( BinaryInputArchive & ar, std::array<T, N> & array )
{
@@ -23,7 +23,7 @@ namespace cereal
}
//! Saving for std::array all other types to binary
template <class T, size_t N>
template <class T, size_t N> inline
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type
save( BinaryOutputArchive & ar, std::array<T, N> const & array )
{
@@ -32,7 +32,7 @@ namespace cereal
}
//! Loading for std::array all other types to binary
template <class T, size_t N>
template <class T, size_t N> inline
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type
load( BinaryInputArchive & ar, std::array<T, N> & array )
{