From ee3f90d13a85c9757c66fed6bb443289e285914d Mon Sep 17 00:00:00 2001 From: cszawisza Date: Mon, 19 Feb 2018 12:28:50 +0100 Subject: [PATCH] make old GCC happy --- include/sqlpp11/insert_value_list.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index be260e78..feceddc3 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -123,11 +123,6 @@ namespace sqlpp template struct insert_list_data_t { - insert_list_data_t(Assignments... assignments) - : _assignments(assignments...), _columns(assignments._lhs...), _values(assignments._rhs...) - { - } - insert_list_data_t(std::tuple assignments) : _assignments(assignments), _columns( columns_from_tuple(assignments) ), _values( values_from_tuple(assignments) ) { @@ -147,9 +142,10 @@ namespace sqlpp interpretable_list_t _dynamic_values; private: template< size_t... Indexes > - auto columns_from_tuple( detail::index_sequence, std::tuple t ) -> decltype (_columns) + auto columns_from_tuple( detail::index_sequence, std::tuple assignments ) -> decltype (_columns) { - return decltype(_columns)(std::get(t)._lhs...); + (void) assignments; + return decltype(_columns)(std::get(assignments)._lhs...); } auto columns_from_tuple(std::tuple assignments) -> decltype (_columns) { @@ -160,7 +156,8 @@ namespace sqlpp template< size_t... Indexes > auto values_from_tuple( detail::index_sequence, std::tuple assignments ) -> decltype(_values) { - return decltype(_values)(std::get(assignments)._rhs...); + (void) assignments; + return decltype(_values)(std::get(assignments)._rhs...); } auto values_from_tuple( std::tuple assignments ) -> decltype(_values) @@ -539,7 +536,7 @@ namespace sqlpp -> _new_statement_t, insert_list_t> { using Check = check_insert_static_set_t; - return _set_impl(Check{}, assignments...); + return _set_impl(Check{}, std::make_tuple(assignments...)); } template @@ -555,7 +552,7 @@ namespace sqlpp insert_list_t<_database_t, Assignments...>> { using Check = check_insert_dynamic_set_t<_database_t, Assignments...>; - return _set_impl<_database_t>(Check{}, assignments...); + return _set_impl<_database_t>(Check{}, std::make_tuple(assignments...)); } template @@ -591,14 +588,6 @@ namespace sqlpp template auto _set_impl(Check, Assignments... assignments) const -> inconsistent; - template - auto _set_impl(consistent_t /*unused*/, Assignments... assignments) const - -> _new_statement_t> - { - return {static_cast&>(*this), - insert_list_data_t{assignments...}}; - } - template auto _set_impl(consistent_t /*unused*/,std::tuple assignments) const -> _new_statement_t>