From 02acab8e344dd34bb691100f01587bf5943b1d1a Mon Sep 17 00:00:00 2001 From: rbock Date: Sun, 9 Nov 2014 17:03:32 +0100 Subject: [PATCH] Fixed compilation for g++-4.8 --- include/sqlpp11/custom_query.h | 4 ++-- include/sqlpp11/select_column_list.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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");