|
| 1 | +From 3b8f4092f74f5a501af7082238b865242ca0da44 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Roland Bock <rbock@eudoxos.de> |
| 3 | +Date: Sun, 7 Sep 2025 09:10:11 +0200 |
| 4 | +Subject: [PATCH] Conditional include for ciso646, #626 |
| 5 | + |
| 6 | +--- |
| 7 | + include/sqlpp11/data_types/boolean/operand.h | 4 +++- |
| 8 | + include/sqlpp11/logic.h | 5 ++++- |
| 9 | + include/sqlpp11/mysql/bind_result.h | 11 ++++++----- |
| 10 | + include/sqlpp11/mysql/char_result.h | 5 ++++- |
| 11 | + include/sqlpp11/postgresql/bind_result.h | 5 ++++- |
| 12 | + include/sqlpp11/sqlite3/bind_result.h | 5 ++++- |
| 13 | + include/sqlpp11/sqlite3/prepared_statement.h | 5 ++++- |
| 14 | + include/sqlpp11/transaction.h | 6 +++++- |
| 15 | + 8 files changed, 34 insertions(+), 12 deletions(-) |
| 16 | + |
| 17 | +diff --git a/include/sqlpp11/data_types/boolean/operand.h b/include/sqlpp11/data_types/boolean/operand.h |
| 18 | +index b22c78209..03171ea21 100644 |
| 19 | +--- a/include/sqlpp11/data_types/boolean/operand.h |
| 20 | ++++ b/include/sqlpp11/data_types/boolean/operand.h |
| 21 | +@@ -26,7 +26,9 @@ |
| 22 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 | + */ |
| 24 | + |
| 25 | +-#include <ciso646> // Required for some compilers to use aliases for boolean operators |
| 26 | ++#ifdef _MSC_VER |
| 27 | ++#include <ciso646> // Required to support boolean operator aliases |
| 28 | ++#endif |
| 29 | + |
| 30 | + #include <sqlpp11/type_traits.h> |
| 31 | + #include <sqlpp11/alias_operators.h> |
| 32 | +diff --git a/include/sqlpp11/logic.h b/include/sqlpp11/logic.h |
| 33 | +index be3ffd332..fa0066455 100644 |
| 34 | +--- a/include/sqlpp11/logic.h |
| 35 | ++++ b/include/sqlpp11/logic.h |
| 36 | +@@ -26,7 +26,10 @@ |
| 37 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 38 | + */ |
| 39 | + |
| 40 | +-#include <ciso646> // Required for some compilers to use aliases for boolean operators |
| 41 | ++#ifdef _MSC_VER |
| 42 | ++#include <ciso646> // Required to support boolean operator aliases |
| 43 | ++#endif |
| 44 | ++ |
| 45 | + #include <type_traits> |
| 46 | + |
| 47 | + namespace sqlpp |
| 48 | +diff --git a/include/sqlpp11/mysql/bind_result.h b/include/sqlpp11/mysql/bind_result.h |
| 49 | +index 0a2126720..ac1b2239e 100644 |
| 50 | +--- a/include/sqlpp11/mysql/bind_result.h |
| 51 | ++++ b/include/sqlpp11/mysql/bind_result.h |
| 52 | +@@ -26,18 +26,19 @@ |
| 53 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 54 | + */ |
| 55 | + |
| 56 | ++#ifdef _MSC_VER |
| 57 | ++#include <ciso646> // Required to support boolean operator aliases |
| 58 | ++#endif |
| 59 | ++ |
| 60 | + #include <limits> |
| 61 | ++#include <iostream> |
| 62 | ++#include <memory> |
| 63 | + |
| 64 | + #include <sqlpp11/chrono.h> |
| 65 | + #include <sqlpp11/exception.h> |
| 66 | + #include <sqlpp11/mysql/detail/prepared_statement_handle.h> |
| 67 | + #include <sqlpp11/mysql/sqlpp_mysql.h> |
| 68 | + |
| 69 | +-#include <iostream> |
| 70 | +-#ifdef _MSC_VER |
| 71 | +-#include <iso646.h> |
| 72 | +-#endif |
| 73 | +-#include <memory> |
| 74 | + |
| 75 | + namespace sqlpp |
| 76 | + { |
| 77 | +diff --git a/include/sqlpp11/mysql/char_result.h b/include/sqlpp11/mysql/char_result.h |
| 78 | +index a3cfc6f97..979fd4d5b 100644 |
| 79 | +--- a/include/sqlpp11/mysql/char_result.h |
| 80 | ++++ b/include/sqlpp11/mysql/char_result.h |
| 81 | +@@ -26,7 +26,10 @@ |
| 82 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 83 | + */ |
| 84 | + |
| 85 | +-#include <ciso646> |
| 86 | ++#ifdef _MSC_VER |
| 87 | ++#include <ciso646> // Required to support boolean operator aliases |
| 88 | ++#endif |
| 89 | ++ |
| 90 | + #include <cstdlib> |
| 91 | + #include <iostream> |
| 92 | + #include <memory> |
| 93 | +diff --git a/include/sqlpp11/postgresql/bind_result.h b/include/sqlpp11/postgresql/bind_result.h |
| 94 | +index 9dc7086ef..15c838767 100644 |
| 95 | +--- a/include/sqlpp11/postgresql/bind_result.h |
| 96 | ++++ b/include/sqlpp11/postgresql/bind_result.h |
| 97 | +@@ -27,6 +27,10 @@ |
| 98 | + * POSSIBILITY OF SUCH DAMAGE. |
| 99 | + */ |
| 100 | + |
| 101 | ++#ifdef _MSC_VER |
| 102 | ++#include <ciso646> // Required to support boolean operator aliases |
| 103 | ++#endif |
| 104 | ++ |
| 105 | + #include <sqlpp11/chrono.h> |
| 106 | + #include <sqlpp11/data_types.h> |
| 107 | + #include <sqlpp11/detail/parse_date_time.h> |
| 108 | +@@ -39,7 +43,6 @@ |
| 109 | + #include "detail/prepared_statement_handle.h" |
| 110 | + |
| 111 | + #ifdef _MSC_VER |
| 112 | +-#include <iso646.h> |
| 113 | + #pragma warning(disable : 4800) // int to bool |
| 114 | + #endif |
| 115 | + namespace sqlpp |
| 116 | +diff --git a/include/sqlpp11/sqlite3/bind_result.h b/include/sqlpp11/sqlite3/bind_result.h |
| 117 | +index 95405f180..f43949808 100644 |
| 118 | +--- a/include/sqlpp11/sqlite3/bind_result.h |
| 119 | ++++ b/include/sqlpp11/sqlite3/bind_result.h |
| 120 | +@@ -26,6 +26,10 @@ |
| 121 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 122 | + */ |
| 123 | + |
| 124 | ++#ifdef _MSC_VER |
| 125 | ++#include <ciso646> // Required to support boolean operator aliases |
| 126 | ++#endif |
| 127 | ++ |
| 128 | + #include <sqlpp11/chrono.h> |
| 129 | + #include <sqlpp11/detail/parse_date_time.h> |
| 130 | + #include <sqlpp11/exception.h> |
| 131 | +@@ -36,7 +40,6 @@ |
| 132 | + #include <memory> |
| 133 | + |
| 134 | + #ifdef _MSC_VER |
| 135 | +-#include <iso646.h> |
| 136 | + #pragma warning(push) |
| 137 | + #pragma warning(disable : 4251) |
| 138 | + #endif |
| 139 | +diff --git a/include/sqlpp11/sqlite3/prepared_statement.h b/include/sqlpp11/sqlite3/prepared_statement.h |
| 140 | +index 4c84232c1..78a6dc67d 100644 |
| 141 | +--- a/include/sqlpp11/sqlite3/prepared_statement.h |
| 142 | ++++ b/include/sqlpp11/sqlite3/prepared_statement.h |
| 143 | +@@ -26,8 +26,11 @@ |
| 144 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 145 | + */ |
| 146 | + |
| 147 | ++#ifdef _MSC_VER |
| 148 | ++#include <ciso646> // Required to support boolean operator aliases |
| 149 | ++#endif |
| 150 | ++ |
| 151 | + #include <memory> |
| 152 | +-#include <ciso646> |
| 153 | + #include <cmath> |
| 154 | + #include <string> |
| 155 | + #include <vector> |
| 156 | +diff --git a/include/sqlpp11/transaction.h b/include/sqlpp11/transaction.h |
| 157 | +index 9635edbd6..0eb9a0c38 100644 |
| 158 | +--- a/include/sqlpp11/transaction.h |
| 159 | ++++ b/include/sqlpp11/transaction.h |
| 160 | +@@ -26,9 +26,13 @@ |
| 161 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 162 | + */ |
| 163 | + |
| 164 | ++#ifdef _MSC_VER |
| 165 | ++#include <ciso646> // Required to support boolean operator aliases |
| 166 | ++#endif |
| 167 | ++ |
| 168 | + #include <stdexcept> |
| 169 | + #include <string> |
| 170 | +-#include <ciso646> |
| 171 | ++ |
| 172 | + |
| 173 | + namespace sqlpp |
| 174 | + { |
0 commit comments