Added static assert to prevent automatic rivial->null conversion to happen in where/having

This commit is contained in:
Roland Bock
2014-01-05 13:29:08 +01:00
parent 409fa3baac
commit 51e0db883f
5 changed files with 42 additions and 8 deletions

View File

@@ -87,7 +87,7 @@ int main()
// Wonderful, now take a look at the parameter list of a select
{
auto s = select(all_of(t)).from(t).where(t.beta.like(parameter(t.beta)) and t.alpha == parameter(t.alpha) or t.gamma != parameter(t.gamma));
auto s = select(all_of(t)).from(t).where(t.beta.like(where_parameter(t.beta)) and t.alpha == where_parameter(t.alpha) or t.gamma != parameter(t.gamma));
using S = decltype(s);
using T = sqlpp::make_parameter_list_t<S>::type;
T npl;