|
Boost : |
Subject: Re: [boost] [serialization] boost/serialization/path.hpp
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-09-23 12:09:32
Sure - just don't put it into the serialization library directories.
a couple of problems.
a)There is no test.
b)No documentation regarding string traits requirments and whatever
well that's enough.
Maybe you want to put this into the file system directory.
Or maybe in the vault to see if there is a wide interest.
Robert Ramey
Johan Råde wrote:
> Let's keep it simple, and use the default traits.
>
> Robert, can I commit the following to the trunk?
>
> --Johan Råde
>
>
> -----------------------------------------------------------------------------------
>
> #ifndef BOOST_SERIALIZATION_PATH_HPP
> #define BOOST_SERIALIZATION_PATH_HPP
>
> // MS compatible compilers support #pragma once
> #if defined(_MSC_VER) && (_MSC_VER >= 1020)
> #pragma once
> #endif
>
> #include <boost/config.hpp>
> #include <boost/filesystem/path.hpp>
> #include <boost/serialization/level.hpp>
>
> namespace boost { namespace serialization {
>
> template<class Archive, class String, class Traits>
> void serialize(Archive& ar, boost::filesystem::basic_path<String,
> Traits>& p, const unsigned int version)
> {
> String s;
> if(Archive::is_saving::value)
> s = p.string();
> ar & boost::serialization::make_nvp("string", s);
> if(Archive::is_loading::value)
> p = s;
> }
>
> }}
>
> #endif
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk