mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-10 04:36:09 -04:00
Fix #317 Visual Studio 2019 compilation error ('SQLite::Database::Database': delegating constructor calls itself) (#318)
* Visual Studio 2019 compilation error ('SQLite::Database::Database': delegating constructor calls itself) #317 * Visual Studio 2019 compilation error ('SQLite::Database::Database': delegating constructor calls itself) #317 * Visual Studio 2019 compilation error ('SQLite::Database::Database': delegating constructor calls itself) #317
This commit is contained in:
parent
ef650e06d6
commit
114f89de30
@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
#include <SQLiteCpp/Column.h>
|
#include <SQLiteCpp/Column.h>
|
||||||
|
|
||||||
#if (__cplusplus >= 201703L) || ( defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)) // c++17: Visual Studio 2017 version 15.7
|
// c++17: MinGW GCC version > 8
|
||||||
|
// c++17: Visual Studio 2017 version 15.7
|
||||||
|
#if ((__cplusplus >= 201703L) && ((!defined(__MINGW32__) && !defined(__MINGW64__)) || (__GNUC__ > 8))) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L))
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#endif // c++17
|
#endif // c++17
|
||||||
|
|
||||||
@ -155,12 +157,15 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (__cplusplus >= 201703L) || ( defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)) // c++17: Visual Studio 2017 version 15.7
|
// c++17: MinGW GCC version > 8
|
||||||
|
// c++17: Visual Studio 2017 version 15.7
|
||||||
|
#if ((__cplusplus >= 201703L) && ((!defined(__MINGW32__) && !defined(__MINGW64__)) || (__GNUC__ > 8))) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Open the provided database std::filesystem::path.
|
* @brief Open the provided database std::filesystem::path.
|
||||||
*
|
*
|
||||||
* @note This feature requires std=C++17
|
* @note This feature requires std=C++17
|
||||||
*
|
*
|
||||||
* Uses sqlite3_open_v2() with readonly default flag, which is the opposite behavior
|
* Uses sqlite3_open_v2() with readonly default flag, which is the opposite behavior
|
||||||
* of the old sqlite3_open() function (READWRITE+CREATE).
|
* of the old sqlite3_open() function (READWRITE+CREATE).
|
||||||
* This makes sense if you want to use it on a readonly filesystem
|
* This makes sense if you want to use it on a readonly filesystem
|
||||||
@ -179,7 +184,8 @@ public:
|
|||||||
const int aFlags = SQLite::OPEN_READONLY,
|
const int aFlags = SQLite::OPEN_READONLY,
|
||||||
const int aBusyTimeoutMs = 0,
|
const int aBusyTimeoutMs = 0,
|
||||||
const std::string& aVfs = "") :
|
const std::string& aVfs = "") :
|
||||||
Database(apFilename.c_str(), aFlags, aBusyTimeoutMs, aVfs.empty() ? nullptr : aVfs.c_str())
|
Database(reinterpret_cast<const char*>(apFilename.u8string().c_str()),
|
||||||
|
aFlags, aBusyTimeoutMs, aVfs.empty() ? nullptr : aVfs.c_str())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +286,7 @@ public:
|
|||||||
* @see exec() to execute, returning number of rows modified
|
* @see exec() to execute, returning number of rows modified
|
||||||
*
|
*
|
||||||
* @param[in] aQueries one or multiple UTF-8 encoded, semicolon-separate SQL statements
|
* @param[in] aQueries one or multiple UTF-8 encoded, semicolon-separate SQL statements
|
||||||
*
|
*
|
||||||
* @return the sqlite result code.
|
* @return the sqlite result code.
|
||||||
*/
|
*/
|
||||||
int tryExec(const char* apQueries) noexcept;
|
int tryExec(const char* apQueries) noexcept;
|
||||||
@ -296,7 +302,7 @@ public:
|
|||||||
* @see exec() to execute, returning number of rows modified
|
* @see exec() to execute, returning number of rows modified
|
||||||
*
|
*
|
||||||
* @param[in] aQueries one or multiple UTF-8 encoded, semicolon-separate SQL statements
|
* @param[in] aQueries one or multiple UTF-8 encoded, semicolon-separate SQL statements
|
||||||
*
|
*
|
||||||
* @return the sqlite result code.
|
* @return the sqlite result code.
|
||||||
*/
|
*/
|
||||||
int tryExec(const std::string aQueries) noexcept
|
int tryExec(const std::string aQueries) noexcept
|
||||||
@ -510,7 +516,7 @@ public:
|
|||||||
* This function reads the first 100 bytes of a SQLite database file
|
* This function reads the first 100 bytes of a SQLite database file
|
||||||
* and reconstructs groups of individual bytes into the associated fields
|
* and reconstructs groups of individual bytes into the associated fields
|
||||||
* in a Header object.
|
* in a Header object.
|
||||||
*
|
*
|
||||||
* @param[in] aFilename path/uri to a file
|
* @param[in] aFilename path/uri to a file
|
||||||
*
|
*
|
||||||
* @return Header object containing file data
|
* @return Header object containing file data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user