ROSE 0.11.145.147
rose_serialize_path.h
1#ifndef ROSE_serialize_path_H
2#define ROSE_serialize_path_H
3#include <featureTests.h>
4
5#include <boost/filesystem/path.hpp>
6
8// Boost
10
12// Cereal
14
15#ifdef ROSE_HAVE_CEREAL
16
17namespace cereal {
18
19template<class Archive>
20void
21CEREAL_SAVE_FUNCTION_NAME(Archive &archive, const boost::filesystem::path &x) {
22 std::string s = x.string();
23 archive(cereal::make_nvp("path", s));
24}
25
26template<class Archive>
27void
28CEREAL_LOAD_FUNCTION_NAME(Archive &archive, boost::filesystem::path &x) {
29 std::string s;
30 archive(cereal::make_nvp("path", s));
31 x = s;
32}
33
34} // namespace
35
36#endif
37#endif