From 90fef442b6cec60f1ecc5daf7217aefd65d8a31d Mon Sep 17 00:00:00 2001 From: Jacyking <791026912@qq.com> Date: Wed, 23 Aug 2023 15:59:54 +0800 Subject: [PATCH] decltype is_null type, bool* or my_bool* --- include/mysql.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mysql.hpp b/include/mysql.hpp index 950dcb68..cabded1b 100644 --- a/include/mysql.hpp +++ b/include/mysql.hpp @@ -346,7 +346,7 @@ class mysql { template void set_param_bind(MYSQL_BIND ¶m_bind, T &&value, int i, - std::map> &mp, B &&is_null) { + std::map> &mp, B &is_null) { using U = std::remove_const_t>; if constexpr (is_optional_v::value) { return set_param_bind(param_bind, *value, i, mp, is_null); @@ -377,7 +377,7 @@ class mysql { param_bind.buffer = &(mp.rbegin()->second[0]); param_bind.buffer_length = 65536; } - param_bind.is_null = is_null; + param_bind.is_null = (B)&is_null; } template