diff --git a/include/sqlpp11/data_types/text/operand.h b/include/sqlpp11/data_types/text/operand.h index 691307d0..67b228fb 100644 --- a/include/sqlpp11/data_types/text/operand.h +++ b/include/sqlpp11/data_types/text/operand.h @@ -26,9 +26,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L #include #endif #include @@ -51,7 +53,7 @@ namespace sqlpp text_operand(_value_t t) : _t(std::move(t)) { } -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L // allow construction from an std::string_view text_operand(std::string_view t) : _t(t) { diff --git a/include/sqlpp11/data_types/text/parameter_value.h b/include/sqlpp11/data_types/text/parameter_value.h index 52fdeeaa..19042af7 100644 --- a/include/sqlpp11/data_types/text/parameter_value.h +++ b/include/sqlpp11/data_types/text/parameter_value.h @@ -26,13 +26,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include #include #include #include -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L #include #endif @@ -51,7 +53,7 @@ namespace sqlpp target._bind_text_parameter(index, &_value, _is_null); } -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L parameter_value_base& operator=(const std::string_view& val) { _value = val; diff --git a/include/sqlpp11/data_types/text/wrap_operand.h b/include/sqlpp11/data_types/text/wrap_operand.h index 00ea3bc9..14f9d860 100644 --- a/include/sqlpp11/data_types/text/wrap_operand.h +++ b/include/sqlpp11/data_types/text/wrap_operand.h @@ -26,8 +26,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L #include #endif #include @@ -37,7 +39,7 @@ namespace sqlpp { struct text_operand; -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L using checked_type = std::string_view; #else using checked_type = std::string; diff --git a/include/sqlpp11/result.h b/include/sqlpp11/result.h index 64d00673..69023d1e 100644 --- a/include/sqlpp11/result.h +++ b/include/sqlpp11/result.h @@ -26,6 +26,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include #include @@ -81,7 +83,7 @@ namespace sqlpp class iterator { public: -#if __cplusplus >= 202002L +#if CXX_STD_VER >= 202002L using iterator_concept = std::input_iterator_tag; #else // LegacyInputIterator describes best our iterator's capabilities. However our iterator does not diff --git a/tests/core/serialize/Insert.cpp b/tests/core/serialize/Insert.cpp index d4b59e94..9285515a 100644 --- a/tests/core/serialize/Insert.cpp +++ b/tests/core/serialize/Insert.cpp @@ -23,6 +23,8 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include "compare.h" #include "Sample.h" #include @@ -47,7 +49,7 @@ int Insert(int, char* []) "INSERT INTO tab_bar (beta,gamma) VALUES('cheesecake'," + getTrue() + ")"); compare(__LINE__, insert_into(bar).set(bar.beta = ::sqlpp::null, bar.gamma = true), "INSERT INTO tab_bar (beta,gamma) VALUES(NULL," + getTrue() + ")"); -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L // string_view argument std::string_view cheeseCake = "cheesecake"; compare(__LINE__, insert_into(bar).set(bar.beta = cheeseCake, bar.gamma = true), diff --git a/tests/core/serialize/Where.cpp b/tests/core/serialize/Where.cpp index 99a2e7d1..a645d4ba 100644 --- a/tests/core/serialize/Where.cpp +++ b/tests/core/serialize/Where.cpp @@ -23,6 +23,8 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include "compare.h" #include "Sample.h" #include @@ -68,7 +70,7 @@ int Where(int, char*[]) compare(__LINE__, where(is_equal_to_or_null(bar.beta, ::sqlpp::value_or_null("SQL"))), " WHERE (tab_bar.beta='SQL')"); compare(__LINE__, where(is_equal_to_or_null(bar.beta, ::sqlpp::value_or_null(::sqlpp::null))), " WHERE tab_bar.beta IS NULL"); -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L // string_view argument std::string_view sqlString = "SQL"; compare(__LINE__, where(bar.beta == sqlString), " WHERE (tab_bar.beta='SQL')"); diff --git a/tests/core/usage/Insert.cpp b/tests/core/usage/Insert.cpp index f5fb3cc3..7f768214 100644 --- a/tests/core/usage/Insert.cpp +++ b/tests/core/usage/Insert.cpp @@ -23,11 +23,13 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include "MockDb.h" #include "Sample.h" #include "is_regular.h" #include -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L #include #endif #include @@ -109,7 +111,7 @@ int Insert(int, char*[]) prepared_insert.params.delta = sqlpp::value_or_null(17); db(prepared_insert); -#if __cplusplus >= 201703L +#if CXX_STD_VER >= 201703L auto prepared_insert_sv = db.prepare(insert_into(t).set(t.gamma = parameter(t.gamma), t.delta = parameter(t.delta), t.beta = parameter(t.beta))); prepared_insert_sv.params.gamma = true; prepared_insert_sv.params.delta = 17;