0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

Added parameter to prevent empty swallow

This commit is contained in:
rbock 2016-05-12 15:01:00 +02:00
parent db3d71e09c
commit 3e6e16f1f0
2 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,7 @@ namespace sqlpp
void _bind_impl(Target& target, const detail::index_sequence<Is...>&) const void _bind_impl(Target& target, const detail::index_sequence<Is...>&) const
{ {
using swallow = int[]; // see interpret_tuple.h using swallow = int[]; // see interpret_tuple.h
(void)swallow{(std::tuple_element<Is, _member_tuple_t>::type::operator()()._bind(target, Is), 0)...}; (void)swallow{0, (std::tuple_element<Is, _member_tuple_t>::type::operator()()._bind(target, Is), 0)...};
} }
}; };

View File

@ -257,7 +257,8 @@ namespace sqlpp
static Context& _(const T& t, Context& context) static Context& _(const T& t, Context& context)
{ {
using swallow = int[]; using swallow = int[];
(void)swallow{(serialize(static_cast<const typename Policies::template _base_t<P>&>(t)()._data, context), 0)...}; (void)swallow{0,
(serialize(static_cast<const typename Policies::template _base_t<P>&>(t)()._data, context), 0)...};
return context; return context;
} }