From 3e6e16f1f02387b64c684b9c661299b0ecf226bd Mon Sep 17 00:00:00 2001 From: rbock Date: Thu, 12 May 2016 15:01:00 +0200 Subject: [PATCH] Added parameter to prevent empty swallow --- include/sqlpp11/parameter_list.h | 2 +- include/sqlpp11/statement.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sqlpp11/parameter_list.h b/include/sqlpp11/parameter_list.h index 14ee3136..4052a61d 100644 --- a/include/sqlpp11/parameter_list.h +++ b/include/sqlpp11/parameter_list.h @@ -61,7 +61,7 @@ namespace sqlpp void _bind_impl(Target& target, const detail::index_sequence&) const { using swallow = int[]; // see interpret_tuple.h - (void)swallow{(std::tuple_element::type::operator()()._bind(target, Is), 0)...}; + (void)swallow{0, (std::tuple_element::type::operator()()._bind(target, Is), 0)...}; } }; diff --git a/include/sqlpp11/statement.h b/include/sqlpp11/statement.h index cc51ca6e..286e6cec 100644 --- a/include/sqlpp11/statement.h +++ b/include/sqlpp11/statement.h @@ -257,7 +257,8 @@ namespace sqlpp static Context& _(const T& t, Context& context) { using swallow = int[]; - (void)swallow{(serialize(static_cast&>(t)()._data, context), 0)...}; + (void)swallow{0, + (serialize(static_cast&>(t)()._data, context), 0)...}; return context; }