On Thu, 27 Mar 2008 15:27:46 -0300, Felipe Magno de Almeida wrote:
Is there any plan to include this code to a tuple header?
tuple_serialization.hpp ?
I think the best way to get it looked at would be to file a bug.
Anyway, if there was an is_tuple<T> metafunction, there would be a more
elegant way to do it:
// not compiled or tested
namespace boost { namespace serialization {
template
struct serialize
{
template<typename Archive>
static void call(Archive & ar, TupleType & t)
{
ar & t.get<Which>();
serialize::call(ar,t);
}
};
template<typename TupleType>
struct serialize
{
template<typename Archive>
static void call(Archive & ar, TupleType & t)
{
ar & t.get<0>();
}
};
template
typename boost::enable_if::type
void serialize(Archive & ar, TupleType & t, int fv)
{
return serialize::call(ar,t);
}
}}
--
Sohail Somani
http://uint32t.blogspot.com