Skip to content

Commit cd24b93

Browse files
authored
Merge pull request SRombauts#346 from guoh27/master
Add compatible definition for std::experimental::filesystem
2 parents dae2167 + 2971d4c commit cd24b93

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/SQLiteCpp/Database.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// c++17: MinGW GCC version > 8
1616
// c++17: Visual Studio 2017 version 15.7
1717
// c++17: macOS unless targetting compatibility with macOS < 10.15
18+
#ifndef SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM
1819
#if __cplusplus >= 201703L
1920
#if defined(__MINGW32__) || defined(__MINGW64__)
2021
#if __GNUC__ > 8 // MinGW requires GCC version > 8 for std::filesystem
@@ -36,6 +37,16 @@ __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_13_0
3637
#include <filesystem>
3738
#endif // c++17 and a suitable compiler
3839

40+
#else // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM
41+
42+
#define SQLITECPP_HAVE_STD_FILESYSTEM
43+
#include <experimental/filesystem>
44+
namespace std {
45+
namespace filesystem = experimental::filesystem;
46+
}
47+
48+
#endif // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM
49+
3950
#include <memory>
4051
#include <string.h>
4152

0 commit comments

Comments
 (0)