Added derived_statement_t alias

This commit is contained in:
rbock
2014-08-27 20:10:31 +02:00
parent 7b85b3fb03
commit 3dfed5b85c
19 changed files with 34 additions and 32 deletions
+2 -2
View File
@@ -177,7 +177,7 @@ namespace sqlpp
auto flags(Args... args) const
-> _new_statement_t<select_flag_list_t<void, Args...>>
{
return { *static_cast<const typename Policies::_statement_t*>(this), select_flag_list_data_t<void, Args...>{args...} };
return { static_cast<const derived_statement_t<Policies>&>(*this), select_flag_list_data_t<void, Args...>{args...} };
}
template<typename... Args>
@@ -185,7 +185,7 @@ namespace sqlpp
-> _new_statement_t<select_flag_list_t<_database_t, Args...>>
{
static_assert(not std::is_same<_database_t, void>::value, "dynamic_flags must not be called in a static statement");
return { *static_cast<const typename Policies::_statement_t*>(this), select_flag_list_data_t<_database_t, Args...>{args...} };
return { static_cast<const derived_statement_t<Policies>&>(*this), select_flag_list_data_t<_database_t, Args...>{args...} };
}
};
};