Skip to content

Commit

Permalink
Import named module std when building named module sqlite_orm
Browse files Browse the repository at this point in the history
  • Loading branch information
trueqbit committed Jul 17, 2024
1 parent 2adf823 commit b0c02a1
Show file tree
Hide file tree
Showing 104 changed files with 491 additions and 51 deletions.
2 changes: 2 additions & 0 deletions dev/alias.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::enable_if, std::is_same
#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)
#include <array>
#endif
#endif

#include "functional/cxx_type_traits_polyfill.h"
#include "functional/mpl/conditional.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/alias_traits.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::is_base_of, std::is_same
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
#include <concepts>
#endif
#endif

#include "functional/cxx_universal.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/arithmetic_tag.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::is_integral
#endif

#include "functional/mpl/conditional.h"

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

#ifndef _IMPORT_STD_MODULE
#include <utility> // std::move
#endif

_EXPORT_SQLITE_ORM namespace sqlite_orm {
namespace internal {
Expand Down
2 changes: 2 additions & 0 deletions dev/ast/exists.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <utility> // std::move
#endif

#include "../tags.h"

Expand Down
2 changes: 2 additions & 0 deletions dev/ast/group_by.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <tuple> // std::tuple, std::make_tuple
#include <type_traits> // std::true_type, std::false_type
#include <utility> // std::forward, std::move
#endif

#include "../functional/cxx_type_traits_polyfill.h"

Expand Down
3 changes: 3 additions & 0 deletions dev/ast/match.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <utility>
#endif

_EXPORT_SQLITE_ORM namespace sqlite_orm {
namespace internal {
Expand Down
2 changes: 2 additions & 0 deletions dev/ast/set.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <tuple> // std::tuple, std::tuple_size
#include <string> // std::string
#include <vector> // std::vector
#include <sstream> // std::stringstream
#include <type_traits> // std::false_type, std::true_type
#endif

#include "../tuple_helper/tuple_traits.h"
#include "../table_name_collector.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/ast/upsert_clause.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#if SQLITE_VERSION_NUMBER >= 3024000
#include <tuple> // std::tuple
#include <utility> // std::forward, std::move
#endif
#endif

#include "../functional/cxx_type_traits_polyfill.h"

Expand Down
2 changes: 2 additions & 0 deletions dev/ast/where.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::false_type, std::true_type
#include <utility> // std::move
#endif

#include "../functional/cxx_universal.h"
#include "../functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/ast_iterator.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <vector> // std::vector
#include <functional> // std::reference_wrapper
#endif

#include "tuple_helper/tuple_iteration.h"
#include "type_traits.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/backup.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#pragma once

#include <sqlite3.h>
#ifndef _IMPORT_STD_MODULE
#include <system_error> // std::system_error
#include <string> // std::string
#include <memory>
#include <utility> // std::move, std::exchange
#endif

#include "error_code.h"
#include "connection_holder.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/carray.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Hence we make it only available for compilers supporting inline variables.
*/

#ifndef _IMPORT_STD_MODULE
#if SQLITE_VERSION_NUMBER >= 3020000
#ifdef SQLITE_ORM_INLINE_VARIABLES_SUPPORTED
#include <utility> // std::move
Expand All @@ -14,6 +15,7 @@
#endif
#endif
#endif
#endif

#include "pointer_value.h"

Expand Down
2 changes: 2 additions & 0 deletions dev/column_expression.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::enable_if, std::is_same, std::decay, std::is_arithmetic
#include <tuple> // std::tuple
#include <functional> // std::reference_wrapper
#endif

#include "functional/cxx_type_traits_polyfill.h"
#include "tuple_helper/tuple_transformer.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/column_names_getter.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::is_base_of
#include <string> // std::string
#include <vector> // std::vector
#include <functional> // std::reference_wrapper
#include <system_error>
#include <utility> // std::move
#endif

#include "tuple_helper/tuple_traits.h"
#include "tuple_helper/tuple_iteration.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/column_pointer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::enable_if, std::is_convertible
#include <utility> // std::move
#endif

#include "functional/cxx_core_features.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
8 changes: 5 additions & 3 deletions dev/column_result.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::enable_if, std::is_same, std::decay, std::is_arithmetic, std::is_base_of
#include <functional> // std::reference_wrapper
#endif

#include "functional/cxx_universal.h" // ::nullptr_t
#include "functional/cxx_universal.h" // std::nullptr_t
#include "functional/cxx_type_traits_polyfill.h"
#include "functional/mpl.h"
#include "tuple_helper/tuple_traits.h"
Expand Down Expand Up @@ -130,8 +132,8 @@ namespace sqlite_orm {
};

template<class DBOs>
struct column_result_t<DBOs, nullptr_t, void> {
using type = nullptr_t;
struct column_result_t<DBOs, std::nullptr_t, void> {
using type = std::nullptr_t;
};

template<class DBOs>
Expand Down
2 changes: 2 additions & 0 deletions dev/conditions.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <string> // std::string
#include <type_traits> // std::enable_if, std::is_same, std::remove_const
#include <vector> // std::vector
#include <tuple> // std::tuple
#include <utility> // std::move, std::forward
#include <sstream> // std::stringstream
#include <iomanip> // std::flush
#endif

#include "functional/cxx_universal.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/connection_holder.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#include <sqlite3.h>
#ifndef _IMPORT_STD_MODULE
#include <atomic>
#include <string> // std::string
#endif

#include "error_code.h"

Expand Down
2 changes: 2 additions & 0 deletions dev/constraints.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::is_base_of, std::false_type, std::true_type
#include <system_error> // std::system_error
#include <ostream> // std::ostream
#include <string> // std::string
#include <tuple> // std::tuple
#endif

#include "functional/cxx_universal.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/core_functions.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <string> // std::string
#include <tuple> // std::make_tuple, std::tuple_size
#include <type_traits> // std::forward, std::is_base_of, std::enable_if
#include <memory> // std::unique_ptr
#include <vector> // std::vector
#endif

#include "functional/cxx_type_traits_polyfill.h"
#include "functional/mpl/conditional.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/cte_column_names_collector.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <string>
#include <vector>
#include <functional> // std::reference_wrapper
#include <system_error>
#endif
#endif

#include "functional/cxx_universal.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/cte_moniker.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
#include <concepts>
Expand All @@ -9,6 +10,7 @@
#include <tuple> // std::ignore
#include <string>
#endif
#endif

#include "functional/cxx_universal.h"
#include "functional/cstring_literal.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/cte_storage.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <type_traits>
#include <tuple>
#include <string>
#include <vector>
#endif
#endif

#include "functional/cxx_universal.h" // ::size_t
#include "tuple_helper/tuple_fy.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/cte_types.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#if(SQLITE_VERSION_NUMBER >= 3008003) && defined(SQLITE_ORM_WITH_CTE)
#include <type_traits>
#include <tuple>
#endif
#endif

#include "functional/cxx_core_features.h"
#include "functional/cxx_type_traits_polyfill.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/default_value_extractor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <string> // std::string
#endif

#include "constraints.h"
#include "serializer_context.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/eponymous_vtabs/dbstat.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
#include <string> // std::string
#endif
#endif

#include "../schema/column.h"
#include "../schema/table.h"
Expand Down
2 changes: 2 additions & 0 deletions dev/error_code.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma once

#include <sqlite3.h>
#ifndef _IMPORT_STD_MODULE
#include <system_error> // std::error_code, std::system_error
#include <string> // std::string
#include <stdexcept>
#include <sstream> // std::ostringstream
#include <type_traits>
#endif

_EXPORT_SQLITE_ORM namespace sqlite_orm {

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

#ifndef _IMPORT_STD_MODULE
#include <tuple>
#include <type_traits> // std::enable_if
#include <utility> // std::move, std::forward, std::declval
#endif
#include "functional/cxx_optional.h"

#include "functional/cxx_universal.h" // ::nullptr_t
#include "functional/cxx_universal.h" // std::nullptr_t
#include "functional/cxx_type_traits_polyfill.h"
#include "tags.h"
#include "operators.h"
Expand Down Expand Up @@ -35,7 +37,7 @@ _EXPORT_SQLITE_ORM namespace sqlite_orm {
return {this->value, std::move(r)};
}

assign_t<T, nullptr_t> operator=(nullptr_t) const {
assign_t<T, std::nullptr_t> operator=(std::nullptr_t) const {
return {this->value, nullptr};
}
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
Expand Down
2 changes: 2 additions & 0 deletions dev/expression_object_type.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#pragma once

#ifndef _IMPORT_STD_MODULE
#include <type_traits> // std::decay, std::remove_reference
#include <functional> // std::reference_wrapper
#endif

#include "type_traits.h"
#include "prepared_statement.h"
Expand Down
Loading

0 comments on commit b0c02a1

Please sign in to comment.