Added macro guard for restricting serialization type

This commit is contained in:
Shane Grant
2013-06-14 15:01:46 -07:00
parent e66e6d38df
commit 618b9c5815
4 changed files with 28 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
#ifndef CEREAL_BINARY_ARCHIVE_TUPLE_HPP_
#define CEREAL_BINARY_ARCHIVE_TUPLE_HPP_
#include <cereal/details/traits.hpp>
#include <cereal/binary_archive/binary_archive.hpp>
#include <tuple>
@@ -24,7 +25,8 @@ namespace cereal
//! Serializing for std::tuple to binary
template <class Archive, class ... Types> inline
void serialize( Archive & ar, std::tuple<Types...> & tuple )
CEREAL_ARCHIVE_RESTRICT_SERIALIZE(BinaryInputArchive, BinaryOutputArchive)
serialize( Archive & ar, std::tuple<Types...> & tuple )
{
tuple_size::serialize<std::tuple_size<std::tuple<Types...>>>( ar, tuple );
}