mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
removing extra non const versions of save
This commit is contained in:
@@ -22,7 +22,7 @@ namespace cereal
|
|||||||
ar.load_binary( array.data(), N * sizeof(T) );
|
ar.load_binary( array.data(), N * sizeof(T) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Saving for const std::array all other types to binary
|
//! Saving for std::array all other types to binary
|
||||||
template <class T, size_t N>
|
template <class T, size_t N>
|
||||||
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type
|
typename std::enable_if<!std::is_arithmetic<T>::value, void>::type
|
||||||
save( BinaryOutputArchive & ar, std::array<T, N> const & array )
|
save( BinaryOutputArchive & ar, std::array<T, N> const & array )
|
||||||
|
|||||||
@@ -16,16 +16,6 @@ namespace cereal
|
|||||||
ar & i;
|
ar & i;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Loading for std::deque all other types from binary (non-const version)
|
|
||||||
template <class T, class A>
|
|
||||||
void save( BinaryOutputArchive & ar, std::deque<T, A> & deque )
|
|
||||||
{
|
|
||||||
ar & deque.size();
|
|
||||||
|
|
||||||
for( auto & i : deque )
|
|
||||||
ar & i;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Loading for std::deque all other types to binary
|
//! Loading for std::deque all other types to binary
|
||||||
template <class T, class A>
|
template <class T, class A>
|
||||||
void load( BinaryInputArchive & ar, std::deque<T, A> & deque )
|
void load( BinaryInputArchive & ar, std::deque<T, A> & deque )
|
||||||
|
|||||||
10
test.cpp
10
test.cpp
@@ -205,15 +205,5 @@ int main()
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ofstream os("test.txt");
|
|
||||||
cereal::BinaryOutputArchive archive(os);
|
|
||||||
std::cout << "Testing:" << std::endl;
|
|
||||||
|
|
||||||
archive & uint8_t();
|
|
||||||
archive & uint16_t(3);
|
|
||||||
//os.write("\0", 1);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user