0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

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() {}; static void _check_consistency() {};
template<typename Db> 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); return _methods_t::_run(db, *this);
} }
template<typename Db> 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); return _methods_t::_prepare(db, *this);
} }

View File

@ -305,7 +305,7 @@ namespace sqlpp
template<typename Db> template<typename Db>
auto _run(Db& db) const 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(); _statement_t::_check_consistency();
static_assert(_statement_t::_get_static_no_of_parameters() == 0, "cannot run select directly with parameters, use prepare instead"); static_assert(_statement_t::_get_static_no_of_parameters() == 0, "cannot run select directly with parameters, use prepare instead");