Skip to content

Commit 11436bf

Browse files
committed
Updated CPP guard for FTS5 virtual table
1 parent 3afacf8 commit 11436bf

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

dev/vtabs/fts5.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#pragma once
22

33
#ifndef SQLITE_ORM_IMPORT_STD_MODULE
4-
#include <string> // std::string
4+
#if SQLITE_VERSION_NUMBER >= 3009000
55
#include <tuple> // std::make_tuple
66
#include <utility> // std::forward
77
#endif
8+
#endif
89

910
#include "../functional/cxx_type_traits_polyfill.h"
1011
#include "../functional/gsl.h"
1112
#include "../functional/mpl.h"
13+
#include "../schema/virtual_table.h"
1214
#include "../schema/column.h"
1315
#include "../constraints.h"
1416

15-
namespace sqlite_orm::internal {
1617
#if SQLITE_VERSION_NUMBER >= 3009000
18+
namespace sqlite_orm::internal {
1719
template<class T>
1820
using is_fts5_table_element_or_constraint = mpl::invoke_t<mpl::disjunction<check_if<is_column>,
1921
check_if_is_template<prefix_t>,
@@ -29,11 +31,9 @@ namespace sqlite_orm::internal {
2931
return "fts5";
3032
}
3133
};
32-
#endif
3334
}
3435

3536
SQLITE_ORM_EXPORT namespace sqlite_orm {
36-
#if SQLITE_VERSION_NUMBER >= 3009000
3737
/**
3838
* Factory function for a FTS5 virtual table definition.
3939
*
@@ -62,5 +62,5 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
6262

6363
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(return {std::make_tuple(std::forward<Cs>(definition)...)});
6464
}
65-
#endif
6665
}
66+
#endif

include/sqlite_orm/sqlite_orm.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26066,23 +26066,26 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
2606626066
// #include "fts5.h"
2606726067

2606826068
#ifndef SQLITE_ORM_IMPORT_STD_MODULE
26069-
#include <string> // std::string
26069+
#if SQLITE_VERSION_NUMBER >= 3009000
2607026070
#include <tuple> // std::make_tuple
2607126071
#include <utility> // std::forward
2607226072
#endif
26073+
#endif
2607326074

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

2607626077
// #include "../functional/gsl.h"
2607726078

2607826079
// #include "../functional/mpl.h"
2607926080

26081+
// #include "../schema/virtual_table.h"
26082+
2608026083
// #include "../schema/column.h"
2608126084

2608226085
// #include "../constraints.h"
2608326086

26084-
namespace sqlite_orm::internal {
2608526087
#if SQLITE_VERSION_NUMBER >= 3009000
26088+
namespace sqlite_orm::internal {
2608626089
template<class T>
2608726090
using is_fts5_table_element_or_constraint = mpl::invoke_t<mpl::disjunction<check_if<is_column>,
2608826091
check_if_is_template<prefix_t>,
@@ -26098,11 +26101,9 @@ namespace sqlite_orm::internal {
2609826101
return "fts5";
2609926102
}
2610026103
};
26101-
#endif
2610226104
}
2610326105

2610426106
SQLITE_ORM_EXPORT namespace sqlite_orm {
26105-
#if SQLITE_VERSION_NUMBER >= 3009000
2610626107
/**
2610726108
* Factory function for a FTS5 virtual table definition.
2610826109
*
@@ -26131,8 +26132,8 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
2613126132

2613226133
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(return {std::make_tuple(std::forward<Cs>(definition)...)});
2613326134
}
26134-
#endif
2613526135
}
26136+
#endif
2613626137

2613726138
#pragma once
2613826139

0 commit comments

Comments
 (0)