On Thu, 27 Mar 2008 16:32:25 -0300, Felipe Magno de Almeida wrote:
Anyway, if there was an is_tuple<T> metafunction, there would be a
more elegant way to do it:
Hmm, no I lied. You couldn't do it this way because then the overload
would be ambiguous when it matched. I think...
Ambigous with what?
Ambiguous with the other boost::serialization::serialize function. I was
thinking of:
template
boost::enable_if::type
serialize(Archive & ar, TupleType & t, const unsigned int);
But the function that gets called when anything is serialized is:
template
void serialize(Archive & ar, T & t, const unsigned int);
So when is_tuple<TupleType>::value is true, then there are two functions
which match the required signature => ambiguous. Atleast in my head
anyway.
Anyway, the Boost.PP version is fine :-)
--
Sohail Somani
http://uint32t.blogspot.com