From 505b85c7299c396b36b9080939f0d49abae35927 Mon Sep 17 00:00:00 2001 From: klaus triendl Date: Thu, 9 Nov 2023 00:29:49 +0200 Subject: [PATCH] Worked around problems with legacy compilers --- dev/node_tuple.h | 2 +- dev/storage.h | 4 ++-- dev/tuple_helper/tuple_filter.h | 6 ++++-- dev/tuple_helper/tuple_traits.h | 2 +- include/sqlite_orm/sqlite_orm.h | 14 ++++++++------ 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dev/node_tuple.h b/dev/node_tuple.h index 632763372..9f32fe566 100644 --- a/dev/node_tuple.h +++ b/dev/node_tuple.h @@ -38,7 +38,7 @@ namespace sqlite_orm { * Node tuple for several types. */ template - using node_tuple_for = conc_tuple...>; + using node_tuple_for = conc_tuple::type...>; template<> struct node_tuple { diff --git a/dev/storage.h b/dev/storage.h index 729d9ccc0..85b1e8c33 100644 --- a/dev/storage.h +++ b/dev/storage.h @@ -107,7 +107,7 @@ namespace sqlite_orm { context_t context{this->db_objects}; statement_serializer serializer; - const auto sql = serializer.serialize(table, context, tableName); + const std::string sql = serializer.serialize(table, context, tableName); perform_void_exec(db, sql); } @@ -982,7 +982,7 @@ namespace sqlite_orm { context.replace_bindable_with_question = true; auto con = this->get_connection(); - const auto sql = serialize(statement, context); + const std::string sql = serialize(statement, context); sqlite3_stmt* stmt = prepare_stmt(con.get(), sql); return prepared_statement_t{std::forward(statement), stmt, con}; } diff --git a/dev/tuple_helper/tuple_filter.h b/dev/tuple_helper/tuple_filter.h index 1888e4ffb..ea58ace1f 100644 --- a/dev/tuple_helper/tuple_filter.h +++ b/dev/tuple_helper/tuple_filter.h @@ -34,7 +34,7 @@ namespace sqlite_orm { #ifndef SQLITE_ORM_BROKEN_VARIADIC_PACK_EXPANSION template class Pred, template class Proj, size_t... Idx> struct filter_tuple_sequence> - : flatten_idxseq>>::value, + : flatten_idxseq>>::value, std::index_sequence, std::index_sequence<>>...> {}; #else @@ -50,7 +50,9 @@ namespace sqlite_orm { template class Pred, template class Proj, size_t... Idx> struct filter_tuple_sequence> - : flatten_idxseq>, Pred>::type...> {}; + : flatten_idxseq>, + Pred>::type...> {}; #endif /* diff --git a/dev/tuple_helper/tuple_traits.h b/dev/tuple_helper/tuple_traits.h index 71f1c13ff..d8af0b737 100644 --- a/dev/tuple_helper/tuple_traits.h +++ b/dev/tuple_helper/tuple_traits.h @@ -14,7 +14,7 @@ namespace sqlite_orm { template class TraitFn, class Tuple> struct tuple_has {}; template class TraitFn, class... Types> - struct tuple_has> : polyfill::disjunction...> {}; + struct tuple_has> : polyfill::disjunction...> {}; /* * Trait metafunction class that checks whether a tuple contains a type with given trait. diff --git a/include/sqlite_orm/sqlite_orm.h b/include/sqlite_orm/sqlite_orm.h index c860ac1a5..a6e9b0d70 100644 --- a/include/sqlite_orm/sqlite_orm.h +++ b/include/sqlite_orm/sqlite_orm.h @@ -1099,7 +1099,7 @@ namespace sqlite_orm { template class TraitFn, class Tuple> struct tuple_has {}; template class TraitFn, class... Types> - struct tuple_has> : polyfill::disjunction...> {}; + struct tuple_has> : polyfill::disjunction...> {}; /* * Trait metafunction class that checks whether a tuple contains a type with given trait. @@ -1207,7 +1207,7 @@ namespace sqlite_orm { #ifndef SQLITE_ORM_BROKEN_VARIADIC_PACK_EXPANSION template class Pred, template class Proj, size_t... Idx> struct filter_tuple_sequence> - : flatten_idxseq>>::value, + : flatten_idxseq>>::value, std::index_sequence, std::index_sequence<>>...> {}; #else @@ -1223,7 +1223,9 @@ namespace sqlite_orm { template class Pred, template class Proj, size_t... Idx> struct filter_tuple_sequence> - : flatten_idxseq>, Pred>::type...> {}; + : flatten_idxseq>, + Pred>::type...> {}; #endif /* @@ -18084,7 +18086,7 @@ namespace sqlite_orm { context_t context{this->db_objects}; statement_serializer serializer; - const auto sql = serializer.serialize(table, context, tableName); + const std::string sql = serializer.serialize(table, context, tableName); perform_void_exec(db, sql); } @@ -18959,7 +18961,7 @@ namespace sqlite_orm { context.replace_bindable_with_question = true; auto con = this->get_connection(); - const auto sql = serialize(statement, context); + const std::string sql = serialize(statement, context); sqlite3_stmt* stmt = prepare_stmt(con.get(), sql); return prepared_statement_t{std::forward(statement), stmt, con}; } @@ -19555,7 +19557,7 @@ namespace sqlite_orm { * Node tuple for several types. */ template - using node_tuple_for = conc_tuple...>; + using node_tuple_for = conc_tuple::type...>; template<> struct node_tuple {