Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected missing #pragma once from file locking_mode.h #1365

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dev/alias.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <utility> // std::make_index_sequence, std::move
#include <string> // std::string
#include <sstream> // std::stringstream
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <array>
#endif

Expand Down Expand Up @@ -101,7 +101,7 @@ namespace sqlite_orm {
return alias_extractor::extract();
}

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
// for CTE monikers -> empty
template<class T = A, satisfies<std::is_same, polyfill::detected_t<type_t, T>, A> = true>
static std::string as_alias() {
Expand Down Expand Up @@ -168,7 +168,7 @@ namespace sqlite_orm {
};
#endif

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
template<size_t n, char... C>
SQLITE_ORM_CONSTEVAL auto n_to_colalias() {
constexpr column_alias<'1' + n % 10, C...> colalias{};
Expand Down Expand Up @@ -223,7 +223,7 @@ namespace sqlite_orm {
polyfill::conjunction<internal::is_table_alias<A>,
polyfill::negation<internal::is_cte_moniker<internal::type_t<A>>>>::value,
bool> = true>
constexpr auto alias_column(F O::*field) {
constexpr auto alias_column(F O::* field) {
using namespace ::sqlite_orm::internal;
using aliased_type = type_t<A>;
static_assert(is_field_of_v<F O::*, aliased_type>, "Column must be from aliased table");
Expand Down Expand Up @@ -281,7 +281,7 @@ namespace sqlite_orm {
}
#endif

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
/**
* Create a column reference to an aliased CTE column.
*/
Expand Down Expand Up @@ -474,7 +474,7 @@ namespace sqlite_orm {
}
#endif

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
inline namespace literals {
/**
* column_alias<'1'[, ...]> from a numeric literal.
Expand Down
2 changes: 1 addition & 1 deletion dev/alias_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace sqlite_orm {
*/
template<class A>
SQLITE_ORM_INLINE_VAR constexpr bool is_cte_moniker_v =
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
polyfill::conjunction_v<is_recordset_alias<A>,
std::is_same<polyfill::detected_t<type_t, A>, std::remove_const_t<A>>>;
#else
Expand Down
2 changes: 1 addition & 1 deletion dev/ast_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace sqlite_orm {
}
};

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
template<class CTE>
struct ast_iterator<CTE, match_specialization_of<CTE, common_table_expression>> {
using node_type = CTE;
Expand Down
10 changes: 5 additions & 5 deletions dev/column_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace sqlite_orm {
SQLITE_ORM_INLINE_VAR constexpr bool is_operator_argument_v<T, std::enable_if_t<is_column_pointer<T>::value>> =
true;

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
template<class A>
struct alias_holder;
#endif
Expand All @@ -51,7 +51,7 @@ namespace sqlite_orm {
* storage.select(column<MyType>(&BaseType::id));
*/
template<class O, class Base, class F, internal::satisfies_not<internal::is_recordset_alias, O> = true>
constexpr internal::column_pointer<O, F Base::*> column(F Base::*field) {
constexpr internal::column_pointer<O, F Base::*> column(F Base::* field) {
static_assert(std::is_convertible<F Base::*, F O::*>::value, "Field must be from derived class");
return {field};
}
Expand All @@ -61,7 +61,7 @@ namespace sqlite_orm {
* Explicitly refer to a column.
*/
template<orm_table_reference auto table, class O, class F>
constexpr auto column(F O::*field) {
constexpr auto column(F O::* field) {
return column<internal::auto_type_t<table>>(field);
}

Expand All @@ -72,7 +72,7 @@ namespace sqlite_orm {
* Explicitly refer to a column.
*/
template<orm_table_reference R, class O, class F>
constexpr auto operator->*(const R& /*table*/, F O::*field) {
constexpr auto operator->*(const R& /*table*/, F O::* field) {
return column<typename R::type>(field);
}
}
Expand All @@ -96,7 +96,7 @@ namespace sqlite_orm {
}
#endif

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
/**
* Explicitly refer to a column alias mapped into a CTE or subquery.
*
Expand Down
2 changes: 1 addition & 1 deletion dev/column_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ namespace sqlite_orm {
template<class DBOs, class T, class F>
struct column_result_t<DBOs, column_pointer<T, F>, void> : column_result_t<DBOs, F> {};

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
template<class DBOs, class Moniker, class ColAlias>
struct column_result_t<DBOs, column_pointer<Moniker, alias_holder<ColAlias>>, void> {
using table_type = storage_pick_table_t<Moniker, DBOs>;
Expand Down
2 changes: 1 addition & 1 deletion dev/conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ namespace sqlite_orm {
}

template<class F, class O>
internal::using_t<O, F O::*> using_(F O::*field) {
internal::using_t<O, F O::*> using_(F O::* field) {
return {field};
}
template<class T, class M>
Expand Down
4 changes: 2 additions & 2 deletions dev/cte_column_names_collector.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <string>
#include <vector>
#include <functional> // std::reference_wrapper
Expand All @@ -15,7 +15,7 @@
#include "select_constraints.h"
#include "serializer_context.h"

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
namespace sqlite_orm {
namespace internal {
// collecting column names utilizes the statement serializer
Expand Down
4 changes: 2 additions & 2 deletions dev/cte_moniker.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
#include <concepts>
#include <utility> // std::make_index_sequence
Expand All @@ -13,7 +13,7 @@
#include "functional/cstring_literal.h"
#include "alias.h"

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
namespace sqlite_orm {

namespace internal {
Expand Down
6 changes: 3 additions & 3 deletions dev/cte_storage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <type_traits>
#include <tuple>
#include <string>
Expand All @@ -21,7 +21,7 @@
namespace sqlite_orm {
namespace internal {

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
// F = field_type
template<typename Moniker,
typename ExplicitColRefs,
Expand Down Expand Up @@ -148,7 +148,7 @@ namespace sqlite_orm {

// F O::* (field/getter) -> field/getter
template<class DBOs, class F, class O, size_t Idx = 0>
auto extract_colref_expressions(const DBOs& /*dbObjects*/, F O::*col, std::index_sequence<Idx> = {}) {
auto extract_colref_expressions(const DBOs& /*dbObjects*/, F O::* col, std::index_sequence<Idx> = {}) {
return std::make_tuple(col);
}

Expand Down
4 changes: 2 additions & 2 deletions dev/cte_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <type_traits>
#include <tuple>
#endif
Expand All @@ -9,7 +9,7 @@
#include "functional/cxx_type_traits_polyfill.h"
#include "tuple_helper/tuple_fy.h"

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
namespace sqlite_orm {

namespace internal {
Expand Down
6 changes: 3 additions & 3 deletions dev/functional/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
// The check here doesn't care and checks the library versions in use.
//
// Another way of detection might be the feature-test macro __cpp_lib_concepts
#if(__cplusplus >= 202002L) && \
#if (__cplusplus >= 202002L) && \
((!_LIBCPP_VERSION || _LIBCPP_VERSION >= 13000) && (!_GLIBCXX_RELEASE || _GLIBCXX_RELEASE >= 10))
#define SQLITE_ORM_STL_HAS_DEFAULT_SENTINEL
#endif

#if(defined(SQLITE_ORM_CLASSTYPE_TEMPLATE_ARGS_SUPPORTED) && defined(SQLITE_ORM_INLINE_VARIABLES_SUPPORTED) && \
defined(SQLITE_ORM_CONSTEVAL_SUPPORTED)) && \
#if (defined(SQLITE_ORM_CLASSTYPE_TEMPLATE_ARGS_SUPPORTED) && defined(SQLITE_ORM_INLINE_VARIABLES_SUPPORTED) && \
defined(SQLITE_ORM_CONSTEVAL_SUPPORTED)) && \
(defined(SQLITE_ORM_CPP20_CONCEPTS_SUPPORTED))
#define SQLITE_ORM_WITH_CPP20_ALIASES
#endif
Expand Down
4 changes: 2 additions & 2 deletions dev/functional/cxx_compiler_quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
// In these cases we have to use helper structures to break down the type alias.
// Note that the detection of specific compilers is so complicated because some compilers emulate other compilers,
// so we simply exclude all compilers that do not support C++20, even though this test is actually inaccurate.
#if(defined(_MSC_VER) && (_MSC_VER < 1920)) || (!defined(_MSC_VER) && (__cplusplus < 202002L))
#if (defined(_MSC_VER) && (_MSC_VER < 1920)) || (!defined(_MSC_VER) && (__cplusplus < 202002L))
#define SQLITE_ORM_BROKEN_ALIAS_TEMPLATE_DEPENDENT_EXPR_SFINAE
#endif

// overwrite SQLITE_ORM_CLASSTYPE_TEMPLATE_ARGS_SUPPORTED
#if(__cpp_nontype_template_args < 201911L) && \
#if (__cpp_nontype_template_args < 201911L) && \
(defined(__clang__) && (__clang_major__ >= 12) && (__cplusplus >= 202002L))
#define SQLITE_ORM_CLASSTYPE_TEMPLATE_ARGS_SUPPORTED
#endif
Expand Down
2 changes: 1 addition & 1 deletion dev/functional/cxx_functional_polyfill.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace sqlite_orm {
// The check here doesn't care and checks the library versions in use.
//
// Another way of detection would be the constrained algorithms feature-test macro __cpp_lib_ranges
#if(__cplusplus >= 202002L) && \
#if (__cplusplus >= 202002L) && \
((!_LIBCPP_VERSION || _LIBCPP_VERSION >= 13000) && (!_GLIBCXX_RELEASE || _GLIBCXX_RELEASE >= 10))
using std::identity;
#else
Expand Down
3 changes: 1 addition & 2 deletions dev/functional/function_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ namespace sqlite_orm {
* A function's arguments tuple
*/
template<class F,
template<class...>
class Tuple,
template<class...> class Tuple,
template<class...> class ProjectOp = polyfill::type_identity_t>
using function_arguments = typename function_traits<F>::template arguments_tuple<Tuple, ProjectOp>;

Expand Down
3 changes: 1 addition & 2 deletions dev/functional/mpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ namespace sqlite_orm {
* Bind a metafunction and arguments at the front of a higher-order metafunction.
*/
template<template<template<class...> class Fn, class... Args2> class HigherFn,
template<class...>
class BoundFn,
template<class...> class BoundFn,
class... Bound>
using bind_front_higherorder_fn =
bind_front<higherorder<0>::quote_fn<HigherFn>, quote_fn<BoundFn>, Bound...>;
Expand Down
2 changes: 2 additions & 0 deletions dev/locking_mode.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <array> // std::array
#include <string> // std::string
#include <utility> // std::pair
Expand Down
2 changes: 1 addition & 1 deletion dev/node_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace sqlite_orm {
template<class T>
struct node_tuple<T, match_if<is_compound_operator, T>> : node_tuple<typename T::expressions_tuple> {};

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
template<class CTE>
struct node_tuple<CTE, match_specialization_of<CTE, common_table_expression>>
: node_tuple<typename CTE::expression_type> {};
Expand Down
4 changes: 2 additions & 2 deletions dev/schema/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace sqlite_orm {
check_if_is_template<table_content_t>>,
T>;

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
/**
* A subselect mapper's CTE moniker, void otherwise.
*/
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace sqlite_orm {
*/
template<class O, bool WithoutRowId, class... Cs>
struct table_t : basic_table {
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
// this typename is used in contexts where it is known that the 'table' holds a subselect_mapper
// instead of a regular object type
using cte_mapper_type = O;
Expand Down
4 changes: 2 additions & 2 deletions dev/select_constraints.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ namespace sqlite_orm {
using super::super;
};

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
/*
* Turn explicit columns for a CTE into types that the CTE backend understands
*/
Expand Down Expand Up @@ -530,7 +530,7 @@ namespace sqlite_orm {
return {{std::forward<E>(expressions)...}};
}

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if SQLITE_VERSION_NUMBER >= 3035003
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
/*
Expand Down
2 changes: 1 addition & 1 deletion dev/statement_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ namespace sqlite_orm {
}
};

#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if (SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#if SQLITE_VERSION_NUMBER >= 3035003
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
template<>
Expand Down
Loading
Loading