Skip to content

Commit

Permalink
fix bug on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacyking committed Aug 25, 2023
1 parent 0b22567 commit 7fcdf8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/mysql.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ class mysql {
int get_last_affect_rows() { return (int)mysql_affected_rows(con_); }

template <typename T>
void set_param_bind(std::vector<MYSQL_BIND> &param_binds, T &&value) {
constexpr void set_param_bind(std::vector<MYSQL_BIND> &param_binds,
T &&value) {
MYSQL_BIND param = {};

using U = std::remove_const_t<std::remove_reference_t<T>>;
Expand Down Expand Up @@ -192,9 +193,8 @@ class mysql {
}

template <typename T, typename B>
constexpr void set_param_bind(MYSQL_BIND &param_bind, T &&value, int i,
std::map<size_t, std::vector<char>> &mp,
B &is_null) {
void set_param_bind(MYSQL_BIND &param_bind, T &&value, int i,
std::map<size_t, std::vector<char>> &mp, B &is_null) {
using U = std::remove_const_t<std::remove_reference_t<T>>;
if constexpr (is_optional_v<U>::value) {
return set_param_bind(param_bind, *value, i, mp, is_null);
Expand Down

0 comments on commit 7fcdf8c

Please sign in to comment.