diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-01-31 20:12:57 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-03 19:02:43 +0000 |
commit | 9bf78dba1a5520b3d50a8d9ac74f0c0c12e46e59 (patch) | |
tree | cb046d5faf68ca86c4e9c49245abdcccd01940f8 | |
parent | Switch to structured binding interface (diff) | |
download | libdbpp-postgresql-9bf78dba1a5520b3d50a8d9ac74f0c0c12e46e59.tar.bz2 libdbpp-postgresql-9bf78dba1a5520b3d50a8d9ac74f0c0c12e46e59.tar.xz libdbpp-postgresql-9bf78dba1a5520b3d50a8d9ac74f0c0c12e46e59.zip |
Remove boost::filesystem in favour of std::filesystem
-rw-r--r-- | libpqpp/Jamfile.jam | 4 | ||||
-rw-r--r-- | libpqpp/pq-connection.h | 1 | ||||
-rw-r--r-- | libpqpp/pq-mock.cpp | 2 | ||||
-rw-r--r-- | libpqpp/pq-mock.h | 4 | ||||
-rw-r--r-- | libpqpp/unittests/Jamfile.jam | 10 | ||||
-rw-r--r-- | libpqpp/unittests/testpq.cpp | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/libpqpp/Jamfile.jam b/libpqpp/Jamfile.jam index b1578ab..2b31d95 100644 --- a/libpqpp/Jamfile.jam +++ b/libpqpp/Jamfile.jam @@ -4,7 +4,7 @@ lib pq ; lib adhocutil : : : : <include>/usr/include/adhocutil ; lib dbppcore : : : : <include>/usr/include/dbpp ; lib boost_date_time ; -lib boost_system ; +lib stdc++fs ; alias libpq : : : : <cflags>"-I`pg_config --includedir`" @@ -19,7 +19,7 @@ lib dbpp-postgresql : <library>adhocutil <library>dbppcore <library>boost_date_time - <library>boost_system + <library>stdc++fs : : <include>. <cflags>"-I`pg_config --includedir`" diff --git a/libpqpp/pq-connection.h b/libpqpp/pq-connection.h index 4544b79..18a0198 100644 --- a/libpqpp/pq-connection.h +++ b/libpqpp/pq-connection.h @@ -48,7 +48,6 @@ namespace PQ { private: static bool checkResultInt(PGresult * res, int expected, int alternative); }; - typedef boost::shared_ptr<Connection> ConnectionPtr; } #endif diff --git a/libpqpp/pq-mock.cpp b/libpqpp/pq-mock.cpp index c563bb2..20ce724 100644 --- a/libpqpp/pq-mock.cpp +++ b/libpqpp/pq-mock.cpp @@ -10,7 +10,7 @@ NAMEDFACTORY("postgresql", PQ::Mock, DB::MockDatabaseFactory); namespace PQ { -Mock::Mock(const std::string & masterdb, const std::string & name, const std::vector<boost::filesystem::path> & ss) : +Mock::Mock(const std::string & masterdb, const std::string & name, const std::vector<std::filesystem::path> & ss) : MockServerDatabase(masterdb, name, "postgresql") { CreateNewDatabase(); diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h index 8ab2fe1..685b75c 100644 --- a/libpqpp/pq-mock.h +++ b/libpqpp/pq-mock.h @@ -2,14 +2,14 @@ #define MOCKPQDATASOURCE_H #include <mockDatabase.h> -#include <boost/filesystem/path.hpp> +#include <filesystem> #include <visibility.h> #include "pq-connection.h" namespace PQ { class DLL_PUBLIC Mock : public DB::MockServerDatabase { public: - Mock(const std::string & master, const std::string & name, const std::vector<boost::filesystem::path> & ss); + Mock(const std::string & master, const std::string & name, const std::vector<std::filesystem::path> & ss); ~Mock(); DB::ConnectionPtr openConnection() const override; diff --git a/libpqpp/unittests/Jamfile.jam b/libpqpp/unittests/Jamfile.jam index 85abb80..577b70c 100644 --- a/libpqpp/unittests/Jamfile.jam +++ b/libpqpp/unittests/Jamfile.jam @@ -3,22 +3,22 @@ import testing ; path-constant me : . ; lib boost_utf : : <name>boost_unit_test_framework ; -lib boost_filesystem ; -lib boost_system ; +lib stdc++fs ; lib dbpptestcore : : : : <include>/usr/include/dbpp ; lib adhocutil : : : : <include>/usr/include/adhocutil ; run testpq.cpp - : : : + : : + pqschema.sql + : <define>ROOT=\"$(me)\" <define>BOOST_TEST_DYN_LINK <library>..//dbpp-postgresql <library>dbpptestcore <library>adhocutil <library>boost_utf - <library>boost_filesystem - <library>boost_system + <library>stdc++fs : testpq ; diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index 4f36ae7..954366a 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE( testP2MockScriptDir ) while (select->fetch()) { std::string path; (*select)[0] >> path; - BOOST_REQUIRE(boost::filesystem::exists(path)); + BOOST_REQUIRE(std::filesystem::exists(path)); } } |