2323
2424#if GTSAM_ENABLE_BOOST_SERIALIZATION
2525
26+ #include < filesystem>
2627#include < iostream>
2728#include < sstream>
2829#include < string>
3132#include < gtsam/base/TestableAssertions.h>
3233
3334#include < boost/serialization/serialization.hpp>
34- #include < boost/filesystem.hpp>
3535
3636
3737// whether to print the serialized text to stdout
@@ -47,10 +47,10 @@ T create() {
4747}
4848
4949// Creates or empties a folder in the build folder and returns the relative path
50- inline boost ::filesystem::path resetFilesystem (
51- boost ::filesystem::path folder = " actual" ) {
52- boost ::filesystem::remove_all (folder);
53- boost ::filesystem::create_directory (folder);
50+ inline std ::filesystem::path resetFilesystem (
51+ std ::filesystem::path folder = " actual" ) {
52+ std ::filesystem::remove_all (folder);
53+ std ::filesystem::create_directory (folder);
5454 return folder;
5555}
5656
@@ -65,7 +65,7 @@ void roundtrip(const T& input, T& output) {
6565// Templated round-trip serialization using a file
6666template <class T >
6767void roundtripFile (const T& input, T& output) {
68- boost ::filesystem::path path = resetFilesystem ()/" graph.dat" ;
68+ std ::filesystem::path path = resetFilesystem ()/" graph.dat" ;
6969 serializeToFile (input, path.string ());
7070 deserializeFromFile (path.string (), output);
7171}
@@ -106,7 +106,7 @@ void roundtripXML(const T& input, T& output) {
106106// Templated round-trip serialization using XML File
107107template <class T >
108108void roundtripXMLFile (const T& input, T& output) {
109- boost ::filesystem::path path = resetFilesystem ()/" graph.xml" ;
109+ std ::filesystem::path path = resetFilesystem ()/" graph.xml" ;
110110 serializeToXMLFile (input, path.string ());
111111 deserializeFromXMLFile (path.string (), output);
112112}
@@ -147,7 +147,7 @@ void roundtripBinary(const T& input, T& output) {
147147// Templated round-trip serialization using Binary file
148148template <class T >
149149void roundtripBinaryFile (const T& input, T& output) {
150- boost ::filesystem::path path = resetFilesystem ()/" graph.bin" ;
150+ std ::filesystem::path path = resetFilesystem ()/" graph.bin" ;
151151 serializeToBinaryFile (input, path.string ());
152152 deserializeFromBinaryFile (path.string (), output);
153153}
0 commit comments