Skip to content

Commit 9c5c319

Browse files
authored
Merge branch 'dev' into dev
2 parents 1fafc86 + 2bc80c7 commit 9c5c319

24 files changed

+34
-32
lines changed

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66
set (CMAKE_CXX_STANDARD 17)
77

88
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
9+
set(HUNTER_TLS_VERIFY ON)
910
include("cmake/HunterGate.cmake")
1011
include("cmake/Catch.cmake")
1112

1213
HunterGate(
13-
URL "https://github.com/ruslo/hunter/archive/v0.19.227.tar.gz"
14-
SHA1 "808b778a443fcdf19c2d18fea8fa4bb59d16596a"
14+
URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz"
15+
SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358"
1516
)
1617

1718
project(SqliteModernCpp)
1819

1920
hunter_add_package(Catch)
2021
hunter_add_package(sqlite3)
2122

22-
find_package(Catch CONFIG REQUIRED)
23+
find_package(Catch2 CONFIG REQUIRED)
2324
find_package(sqlite3 CONFIG REQUIRED)
2425

2526
set(TEST_SOURCE_DIR ${CMAKE_SOURCE_DIR}/tests)
@@ -37,9 +38,9 @@ target_include_directories(sqlite_modern_cpp INTERFACE hdr/)
3738
add_executable(tests_runner ${TEST_SOURCES})
3839
target_include_directories(tests_runner INTERFACE ${SQLITE3_INCLUDE_DIRS})
3940
if(ENABLE_SQLCIPHER_TESTS)
40-
target_link_libraries(tests_runner Catch::Catch sqlite_modern_cpp sqlite3::sqlite3 -lsqlcipher)
41+
target_link_libraries(tests Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3 -lsqlcipher)
4142
else()
42-
target_link_libraries(tests_runner Catch::Catch sqlite_modern_cpp sqlite3::sqlite3)
43+
target_link_libraries(tests Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3)
4344
endif()
4445

4546
catch_discover_tests(tests_runner)

hdr/sqlite_modern_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace sqlite {
2929
template<class T, bool Name = false>
3030
struct index_binding_helper {
3131
index_binding_helper(const index_binding_helper &) = delete;
32-
#if __cplusplus < 201703
32+
#if __cplusplus < 201703 || _MSVC_LANG <= 201703
3333
index_binding_helper(index_binding_helper &&) = default;
3434
#endif
3535
typename std::conditional<Name, const char *, int>::type index;

hdr/sqlite_modern_cpp/type_wrapper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@
55
#include <memory>
66
#include <vector>
77
#ifdef __has_include
8-
#if __cplusplus >= 201703 && __has_include(<string_view>)
8+
#if (__cplusplus >= 201703 || _MSVC_LANG >= 201703) && __has_include(<string_view>)
99
#define MODERN_SQLITE_STRINGVIEW_SUPPORT
1010
#endif
1111
#endif
1212
#ifdef __has_include
13-
#if __cplusplus > 201402 && __has_include(<optional>)
13+
#if (__cplusplus > 201402 || _MSCV_LANG > 201402) && __has_include(<optional>)
1414
#define MODERN_SQLITE_STD_OPTIONAL_SUPPORT
1515
#elif __has_include(<experimental/optional>) && __apple_build_version__ < 11000000
1616
#define MODERN_SQLITE_EXPERIMENTAL_OPTIONAL_SUPPORT
1717
#endif
1818
#endif
1919

2020
#ifdef __has_include
21-
#if __cplusplus > 201402 && __has_include(<variant>)
21+
#if (__cplusplus > 201402 || _MSVC_LANG > 201402) && __has_include(<variant>)
2222
#define MODERN_SQLITE_STD_VARIANT_SUPPORT
2323
#endif
2424
#endif

hdr/sqlite_modern_cpp/utility/utf16_utf8.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace sqlite {
1717
std::size_t produced_output = 0;
1818
while(true) {
1919
char *used_output;
20-
switch(codecvt.out(state, remaining_input, &input[input.size()],
20+
switch(codecvt.out(state, remaining_input, input.data() + input.size(),
2121
remaining_input, &result[produced_output],
2222
&result[result.size() - 1] + 1, used_output)) {
2323
case std::codecvt_base::ok:
@@ -33,7 +33,7 @@ namespace sqlite {
3333
produced_output = used_output - result.data();
3434
result.resize(
3535
result.size()
36-
+ (std::max)((&input[input.size()] - remaining_input) * 3 / 2,
36+
+ (std::max)((input.data() + input.size() - remaining_input) * 3 / 2,
3737
std::ptrdiff_t(4)));
3838
}
3939
}

tests/blob_example.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdlib>
33
#include <vector>
44
#include <string>
5-
#include <catch.hpp>
5+
#include <catch2/catch.hpp>
66
#include <sqlite_modern_cpp.h>
77
using namespace sqlite;
88
using namespace std;

tests/error_log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdexcept>
66
#include <sqlite_modern_cpp.h>
77
#include <sqlite_modern_cpp/log.h>
8-
#include <catch.hpp>
8+
#include <catch2/catch.hpp>
99
using namespace sqlite;
1010
using namespace std;
1111

tests/exception_dont_execute.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <memory>
44
#include <stdexcept>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

tests/exception_dont_execute_nested.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <memory>
44
#include <stdexcept>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

tests/exceptions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <memory>
55
#include <stdexcept>
66
#include <sqlite_modern_cpp.h>
7-
#include <catch.hpp>
7+
#include <catch2/catch.hpp>
88
using namespace sqlite;
99
using namespace std;
1010

tests/flags.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <cstdlib>
44
#include <sqlite_modern_cpp.h>
55
#include <sys/types.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

0 commit comments

Comments
 (0)