From 2971d4c975c8e893421fe65c207ab18ddc199377 Mon Sep 17 00:00:00 2001 From: "hong.guo" Date: Fri, 26 Nov 2021 13:07:56 +0800 Subject: [PATCH] add compatible definition for std::experimental::filesystem --- include/SQLiteCpp/Database.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/SQLiteCpp/Database.h b/include/SQLiteCpp/Database.h index 7ee45d8..95ed341 100644 --- a/include/SQLiteCpp/Database.h +++ b/include/SQLiteCpp/Database.h @@ -15,6 +15,7 @@ // c++17: MinGW GCC version > 8 // c++17: Visual Studio 2017 version 15.7 // c++17: macOS unless targetting compatibility with macOS < 10.15 +#ifndef SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM #if __cplusplus >= 201703L #if defined(__MINGW32__) || defined(__MINGW64__) #if __GNUC__ > 8 // MinGW requires GCC version > 8 for std::filesystem @@ -33,6 +34,16 @@ #include #endif // c++17 and a suitable compiler +#else // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM + +#define SQLITECPP_HAVE_STD_FILESYSTEM +#include +namespace std { +namespace filesystem = experimental::filesystem; +} + +#endif // SQLITECPP_HAVE_STD_EXPERIMENTAL_FILESYSTEM + #include #include