Fix compile errors/warning in clang++-20

This commit is contained in:
Roland Bock
2025-06-15 09:12:26 +02:00
parent 62bf161c88
commit e9411dcd20
5 changed files with 12 additions and 4 deletions

View File

@@ -33,8 +33,9 @@ namespace sqlpp
struct consistent_t : std::true_type
{
template <typename... T>
static constexpr void verify(T&&...)
static constexpr int verify(T&&...)
{
return 0;
}
};
} // namespace sqlpp

View File

@@ -26,6 +26,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <string>
#include <sqlpp11/type_traits.h>
namespace sqlpp

View File

@@ -39,7 +39,6 @@
#include <sqlpp11/mysql/update.h>
#include <sqlpp11/serialize.h>
#include <iostream>
#include <sstream>
#include <string>
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();
}

View File

@@ -40,9 +40,10 @@ namespace sqlpp
static_assert(wrong_t<T...>::value, message); \
} \
template <typename... T> \
static constexpr void verify(T&&...) \
static constexpr int verify(T&&...) \
{ \
static_assert(wrong_t<T...>::value, message); \
return 0; \
} \
auto begin() const -> void; \
auto end() const -> void; \

View File

@@ -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);