Skip to content

Commit 2971d4c

Browse files
committed
add compatible definition for std::experimental::filesystem
1 parent beb2b29 commit 2971d4c

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
@@ -33,6 +34,16 @@
3334
#include <filesystem>
3435
#endif // c++17 and a suitable compiler
3536

37+
#else // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM
38+
39+
#define SQLITECPP_HAVE_STD_FILESYSTEM
40+
#include <experimental/filesystem>
41+
namespace std {
42+
namespace filesystem = experimental::filesystem;
43+
}
44+
45+
#endif // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM
46+
3647
#include <memory>
3748
#include <string.h>
3849

0 commit comments

Comments
 (0)