Fixed compilation for g++-4.8

This commit is contained in:
rbock
2014-11-09 17:03:32 +01:00
parent a20ff91c2d
commit 02acab8e34
2 changed files with 3 additions and 3 deletions

View File

@@ -73,13 +73,13 @@ namespace sqlpp
static void _check_consistency() {};
template<typename Db>
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<typename Db>
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);
}

View File

@@ -305,7 +305,7 @@ namespace sqlpp
template<typename Db>
auto _run(Db& db) const
-> result_t<decltype(db.select(_get_statement())), _result_row_t<Db>>
-> result_t<decltype(db.select(std::declval<_statement_t>())), _result_row_t<Db>>
{
_statement_t::_check_consistency();
static_assert(_statement_t::_get_static_no_of_parameters() == 0, "cannot run select directly with parameters, use prepare instead");