Boost logo

Boost Users :

From: Tim St. Clair (timothysc_at_[hidden])
Date: 2008-07-04 09:20:36


You can overload for any container type even if it has not already been
done:

namespace boost {
namespace serialization {

// single
template<class Archive, class YOUR_TYPE>
inline void serialize( Archive & ar
                     , std::priority_queue< YOUR_TYPE >& t
                     , const unsigned int
)
{
   // I'll let you figure out the symmetric logic here, either that or you
can
   // split the load & save.
   ar & boost::serialization::make_nvp( ... );
}

} // end namespace serialization
} // end namespace boost

Hope this helps,
Tim

On Wed, Jul 2, 2008 at 10:02 AM, mbrodeur65 <martin.brodeur_at_[hidden]>
wrote:

>
> Hi,
>
> I am wondering if there is a way to serialize a std::priority_queue ?
>
> thanks for any help.
> --
> View this message in context:
> http://www.nabble.com/-serialization--priority_queue-tp18239627p18239627.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Regards,
Timothy St. Clair
[timothysc_at_[hidden]]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net