Skip to content

Commit 87101de

Browse files
committed
Merge branch 'upstream/dev' into upstream/experimental/named-parameters
2 parents e92fe74 + 72549e4 commit 87101de

File tree

9 files changed

+29
-31
lines changed

9 files changed

+29
-31
lines changed

appveyor.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ environment:
2727

2828
- job_name: clang, C++23
2929
appveyor_build_worker_image: Ubuntu2204
30-
CC: clang-18
31-
CXX: clang++-18
30+
CC: clang-20
31+
CXX: clang++-20
3232
SQLITE_ORM_CXX_STANDARD: "-DSQLITE_ORM_ENABLE_CXX_23=ON"
3333
cmake_build_parallel: ""
3434

@@ -108,7 +108,7 @@ for:
108108
install:
109109
- |-
110110
cd C:\Tools\vcpkg
111-
git fetch --tags && git checkout 2025.04.09
111+
git fetch --tags && git checkout 2025.08.27
112112
cd %APPVEYOR_BUILD_FOLDER%
113113
C:\Tools\vcpkg\bootstrap-vcpkg.bat -disableMetrics
114114
C:\Tools\vcpkg\vcpkg integrate install
@@ -142,7 +142,7 @@ for:
142142
install:
143143
- |-
144144
pushd $HOME/vcpkg
145-
git fetch --tags && git checkout 2025.04.09
145+
git fetch --tags && git checkout 2025.08.27
146146
popd
147147
$HOME/vcpkg/bootstrap-vcpkg.sh -disableMetrics
148148
$HOME/vcpkg/vcpkg integrate install --overlay-triplets=vcpkg/triplets
@@ -170,7 +170,7 @@ for:
170170
# using custom vcpkg triplets for building and linking dynamic dependent libraries
171171
install:
172172
- |-
173-
git clone --depth 1 --branch 2025.04.09 https://github.com/microsoft/vcpkg.git $HOME/vcpkg
173+
git clone --depth 1 --branch 2025.08.27 https://github.com/microsoft/vcpkg.git $HOME/vcpkg
174174
$HOME/vcpkg/bootstrap-vcpkg.sh -disableMetrics
175175
$HOME/vcpkg/vcpkg integrate install --overlay-triplets=vcpkg/triplets
176176
vcpkg install sqlite3[core,dbstat,math,json1,fts5,soundex] catch2 --overlay-triplets=vcpkg/triplets

dev/result_set_iterator.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "column_result_proxy.h"
1313
#include "util.h"
1414

15-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
1615
namespace sqlite_orm::internal {
1716

1817
template<class ColResult, class DBOs>
@@ -71,6 +70,11 @@ namespace sqlite_orm::internal {
7170
friend bool operator==(const result_set_iterator& it, const result_set_sentinel_t&) noexcept {
7271
return sqlite3_data_count(it.stmt.get()) == 0;
7372
}
73+
#ifndef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
74+
friend bool operator!=(const result_set_iterator& it, const result_set_sentinel_t& s) noexcept {
75+
return !(it == s);
76+
}
77+
#endif
7478

7579
private:
7680
void step() {
@@ -87,4 +91,3 @@ namespace sqlite_orm::internal {
8791
statement_finalizer stmt;
8892
};
8993
}
90-
#endif

dev/result_set_view.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#ifndef SQLITE_ORM_IMPORT_STD_MODULE
55
#include <utility> // std::move, std::remove_cvref
66
#include <functional> // std::reference_wrapper
7-
#if defined(SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED) && defined(SQLITE_ORM_CPP20_RANGES_SUPPORTED)
7+
#ifdef SQLITE_ORM_CPP20_RANGES_SUPPORTED
88
#include <ranges> // std::ranges::view_interface
99
#endif
1010
#endif
@@ -18,7 +18,6 @@
1818
#include "type_traits.h"
1919
#include "storage_lookup.h"
2020

21-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
2221
namespace sqlite_orm::internal {
2322
/*
2423
* A C++ view over a result set of a select statement, returned by `storage_t::iterate()`.
@@ -47,7 +46,7 @@ namespace sqlite_orm::internal {
4746

4847
auto begin() {
4948
const auto& exprDBOs = db_objects_for_expression(this->db_objects.get(), this->expression);
50-
using ExprDBOs = std::remove_cvref_t<decltype(exprDBOs)>;
49+
using ExprDBOs = polyfill::remove_cvref_t<decltype(exprDBOs)>;
5150
// note: Select can be `select_t` or `with_t`
5251
using select_type = polyfill::detected_or_t<expression_type, expression_type_t, expression_type>;
5352
using column_result_type = column_result_of_t<ExprDBOs, select_type>;
@@ -82,4 +81,3 @@ namespace sqlite_orm::internal {
8281
template<class Select, class DBOs>
8382
inline constexpr bool std::ranges::enable_borrowed_range<sqlite_orm::internal::result_set_view<Select, DBOs>> = true;
8483
#endif
85-
#endif

dev/storage.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ namespace sqlite_orm {
298298
}
299299
#endif
300300

301-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
302301
/*
303302
* Iterate over a result set of a select statement.
304303
*
@@ -331,7 +330,6 @@ namespace sqlite_orm {
331330
return {this->db_objects, std::move(connection), std::move(expression)};
332331
}
333332
#endif
334-
#endif
335333

336334
#ifdef SQLITE_ORM_CPP23_GENERATOR_SUPPORTED
337335
/*

examples/iteration.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ int main(int, char**) {
6666
}
6767
cout << "heroesByAlgorithm.size = " << heroesByAlgorithm.size() << endl;
6868

69-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
7069
cout << "====" << endl;
7170

7271
cout << "Distinct hero names:" << endl;
7372
for (std::string name: storage.iterate(select(distinct(&MarvelHero::name)))) {
7473
cout << name << endl;
7574
}
76-
#endif
7775

7876
return 0;
7977
}

include/sqlite_orm/sqlite_orm.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16648,7 +16648,7 @@ inline constexpr bool std::ranges::enable_borrowed_range<sqlite_orm::internal::m
1664816648
#ifndef SQLITE_ORM_IMPORT_STD_MODULE
1664916649
#include <utility> // std::move, std::remove_cvref
1665016650
#include <functional> // std::reference_wrapper
16651-
#if defined(SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED) && defined(SQLITE_ORM_CPP20_RANGES_SUPPORTED)
16651+
#ifdef SQLITE_ORM_CPP20_RANGES_SUPPORTED
1665216652
#include <ranges> // std::ranges::view_interface
1665316653
#endif
1665416654
#endif
@@ -16674,7 +16674,6 @@ inline constexpr bool std::ranges::enable_borrowed_range<sqlite_orm::internal::m
1667416674

1667516675
// #include "util.h"
1667616676

16677-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
1667816677
namespace sqlite_orm::internal {
1667916678

1668016679
template<class ColResult, class DBOs>
@@ -16733,6 +16732,11 @@ namespace sqlite_orm::internal {
1673316732
friend bool operator==(const result_set_iterator& it, const result_set_sentinel_t&) noexcept {
1673416733
return sqlite3_data_count(it.stmt.get()) == 0;
1673516734
}
16735+
#ifndef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
16736+
friend bool operator!=(const result_set_iterator& it, const result_set_sentinel_t& s) noexcept {
16737+
return !(it == s);
16738+
}
16739+
#endif
1673616740

1673716741
private:
1673816742
void step() {
@@ -16749,7 +16753,6 @@ namespace sqlite_orm::internal {
1674916753
statement_finalizer stmt;
1675016754
};
1675116755
}
16752-
#endif
1675316756

1675416757
// #include "ast_iterator.h"
1675516758

@@ -16761,7 +16764,6 @@ namespace sqlite_orm::internal {
1676116764

1676216765
// #include "storage_lookup.h"
1676316766

16764-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
1676516767
namespace sqlite_orm::internal {
1676616768
/*
1676716769
* A C++ view over a result set of a select statement, returned by `storage_t::iterate()`.
@@ -16790,7 +16792,7 @@ namespace sqlite_orm::internal {
1679016792

1679116793
auto begin() {
1679216794
const auto& exprDBOs = db_objects_for_expression(this->db_objects.get(), this->expression);
16793-
using ExprDBOs = std::remove_cvref_t<decltype(exprDBOs)>;
16795+
using ExprDBOs = polyfill::remove_cvref_t<decltype(exprDBOs)>;
1679416796
// note: Select can be `select_t` or `with_t`
1679516797
using select_type = polyfill::detected_or_t<expression_type, expression_type_t, expression_type>;
1679616798
using column_result_type = column_result_of_t<ExprDBOs, select_type>;
@@ -16825,7 +16827,6 @@ namespace sqlite_orm::internal {
1682516827
template<class Select, class DBOs>
1682616828
inline constexpr bool std::ranges::enable_borrowed_range<sqlite_orm::internal::result_set_view<Select, DBOs>> = true;
1682716829
#endif
16828-
#endif
1682916830

1683016831
// #include "ast_iterator.h"
1683116832

@@ -23689,7 +23690,6 @@ namespace sqlite_orm {
2368923690
}
2369023691
#endif
2369123692

23692-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
2369323693
/*
2369423694
* Iterate over a result set of a select statement.
2369523695
*
@@ -23722,7 +23722,6 @@ namespace sqlite_orm {
2372223722
return {this->db_objects, std::move(connection), std::move(expression)};
2372323723
}
2372423724
#endif
23725-
#endif
2372623725

2372723726
#ifdef SQLITE_ORM_CPP23_GENERATOR_SUPPORTED
2372823727
/*

tests/ast_iterator_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ TEST_CASE("ast_iterator") {
6464
}
6565
SECTION("named") {
6666
auto bindable = "@p"_param.create<int>();
67-
constexpr auto node = select(bindable);
67+
auto node = select(bindable);
6868
expected.push_back(typeid(int));
6969
iterate_ast(node, lambda);
7070
}

tests/iterate.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,18 @@ TEST_CASE("Iterate mapped") {
6161
}
6262
}
6363

64-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
6564
TEST_CASE("Iterate select statement") {
6665
struct Test {
6766
int64_t id = 0;
6867
std::vector<char> key;
6968

69+
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
7070
bool operator==(const Test&) const = default;
71+
#else
72+
bool operator==(const Test& right) const {
73+
return this->id == right.id && this->key == right.key;
74+
}
75+
#endif
7176
};
7277
#ifdef SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED
7378
constexpr orm_table_reference auto test_table = c<Test>();
@@ -144,4 +149,3 @@ TEST_CASE("Iterate select statement") {
144149
#endif
145150
#endif
146151
}
147-
#endif

tests/static_tests/iterator_t.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
using namespace sqlite_orm;
1010
using internal::mapped_iterator;
1111
using internal::mapped_view;
12-
using internal::structure;
13-
#ifdef SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED
1412
using internal::result_set_iterator;
1513
using internal::result_set_sentinel_t;
1614
using internal::result_set_view;
17-
#endif
15+
using internal::structure;
1816
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
1917
using internal::table_reference;
2018
#endif
@@ -81,7 +79,7 @@ concept storage_iterate_mapped_ref = requires(S& storage_type) {
8179
};
8280
#endif
8381

84-
#if defined(SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED) && defined(SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED)
82+
#ifdef SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED
8583
template<class Iter, class Value>
8684
concept can_iterate_result_set = requires(Iter it) {
8785
requires std::input_iterator<Iter>;
@@ -190,7 +188,7 @@ TEST_CASE("can view and iterate mapped") {
190188
#endif
191189
}
192190

193-
#if defined(SQLITE_ORM_DEFAULT_COMPARISONS_SUPPORTED) && defined(SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED)
191+
#ifdef SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED
194192
TEST_CASE("can view and iterate result set") {
195193
struct Object {};
196194
using empty_storage_type = decltype(make_storage(""));

0 commit comments

Comments
 (0)