diff --git a/include/sqlpp11/consistent.h b/include/sqlpp11/consistent.h index e55c20c8..ad80609e 100644 --- a/include/sqlpp11/consistent.h +++ b/include/sqlpp11/consistent.h @@ -33,8 +33,9 @@ namespace sqlpp struct consistent_t : std::true_type { template - static constexpr void verify(T&&...) + static constexpr int verify(T&&...) { + return 0; } }; } // namespace sqlpp diff --git a/include/sqlpp11/data_types/text/data_type.h b/include/sqlpp11/data_types/text/data_type.h index 6504b23c..3b72ed73 100644 --- a/include/sqlpp11/data_types/text/data_type.h +++ b/include/sqlpp11/data_types/text/data_type.h @@ -26,6 +26,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #include namespace sqlpp diff --git a/include/sqlpp11/mysql/connection.h b/include/sqlpp11/mysql/connection.h index a75945e7..fbfdb79f 100644 --- a/include/sqlpp11/mysql/connection.h +++ b/include/sqlpp11/mysql/connection.h @@ -39,7 +39,6 @@ #include #include #include -#include #include namespace sqlpp @@ -281,7 +280,10 @@ namespace sqlpp return serialize(t, context); } - [[deprecated("Use ping_server() instead")]] bool is_valid() const +#if SQLPP_CXX_STD >= 201402L + [[deprecated("Use ping_server() instead")]] +#endif + bool is_valid() const { return _handle->ping_server(); } diff --git a/include/sqlpp11/portable_static_assert.h b/include/sqlpp11/portable_static_assert.h index 7129aff1..3271bf36 100644 --- a/include/sqlpp11/portable_static_assert.h +++ b/include/sqlpp11/portable_static_assert.h @@ -40,9 +40,10 @@ namespace sqlpp static_assert(wrong_t::value, message); \ } \ template \ - static constexpr void verify(T&&...) \ + static constexpr int verify(T&&...) \ { \ static_assert(wrong_t::value, message); \ + return 0; \ } \ auto begin() const -> void; \ auto end() const -> void; \ diff --git a/include/sqlpp11/result_row.h b/include/sqlpp11/result_row.h index a6241b62..8bb64d5f 100644 --- a/include/sqlpp11/result_row.h +++ b/include/sqlpp11/result_row.h @@ -314,6 +314,7 @@ namespace sqlpp _impl::_apply(callable); std::size_t index = sizeof...(FieldSpecs); + std::ignore = index; // silence warnings in case _dynamic_field_names is empty for (const auto& field_name : _dynamic_field_names) { _dynamic_fields.at(field_name)._apply(callable); @@ -327,6 +328,7 @@ namespace sqlpp _impl::_apply(callable); std::size_t index = sizeof...(FieldSpecs); + std::ignore = index; // silence warnings in case _dynamic_field_names is empty for (const auto& field_name : _dynamic_field_names) { _dynamic_fields.at(field_name)._apply(callable);