diff --git a/include/sqlpp11/select.h b/include/sqlpp11/select.h index 7c6ba00d..652c12cf 100644 --- a/include/sqlpp11/select.h +++ b/include/sqlpp11/select.h @@ -86,7 +86,8 @@ namespace sqlpp // SELECT template - struct select_t: public vendor::policy_t..., public vendor::crtp_wrapper_t, Policies>... + struct select_t: public vendor::policy_t..., public vendor::crtp_wrapper_t, Policies>..., + public detail::select_helper_t::_column_list_t::_value_type::template operators> { template using _policy_update_t = select_t...>; diff --git a/tests/SelectTest.cpp b/tests/SelectTest.cpp index 8ff93911..9172920c 100644 --- a/tests/SelectTest.cpp +++ b/tests/SelectTest.cpp @@ -363,9 +363,8 @@ int main() auto z = select(t.alpha) == 7; auto l = t.as(alias::left); auto r = select(t.gamma.as(alias::a)).from(t).where(t.gamma == true).as(alias::right); -#if 0 static_assert(sqlpp::is_boolean_t::value, "select(bool) has to be a bool"); - interpret(select(sqlpp::distinct, sqlpp::straight_join, l.alpha, l.beta, select(r.a).from(r)) + interpret(sqlpp::select().flags(sqlpp::distinct, sqlpp::straight_join).columns(l.alpha, l.beta, select(r.a).from(r)) .from(l, r) .where(t.beta == "hello world" and select(t.gamma).from(t))// .as(alias::right)) .group_by(l.gamma, r.a) @@ -375,7 +374,6 @@ int main() .offset(3) .as(alias::a) , printer).flush(); -#endif return 0; }