diff --git a/include/sqlpp11/custom_query.h b/include/sqlpp11/custom_query.h index 662891dd..9c77bc72 100644 --- a/include/sqlpp11/custom_query.h +++ b/include/sqlpp11/custom_query.h @@ -73,13 +73,13 @@ namespace sqlpp static void _check_consistency() {}; template - auto _run(Db& db) const -> decltype(_methods_t::_run(db, *this)) + auto _run(Db& db) const -> decltype(std::declval<_methods_t>()._run(db, *this)) { return _methods_t::_run(db, *this); } template - auto _prepare(Db& db) const -> decltype(_methods_t::_prepare(db, *this)) + auto _prepare(Db& db) const -> decltype(std::declval<_methods_t>()._prepare(db, *this)) { return _methods_t::_prepare(db, *this); } diff --git a/include/sqlpp11/select_column_list.h b/include/sqlpp11/select_column_list.h index 0a6fa6bf..ad40bf44 100644 --- a/include/sqlpp11/select_column_list.h +++ b/include/sqlpp11/select_column_list.h @@ -305,7 +305,7 @@ namespace sqlpp template auto _run(Db& db) const - -> result_t> + -> result_t())), _result_row_t> { _statement_t::_check_consistency(); static_assert(_statement_t::_get_static_no_of_parameters() == 0, "cannot run select directly with parameters, use prepare instead");