mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
make old GCC happy
This commit is contained in:
parent
e50ee42364
commit
ee3f90d13a
@ -123,11 +123,6 @@ namespace sqlpp
|
||||
template <typename Database, typename... Assignments>
|
||||
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(assignments), _columns( columns_from_tuple(assignments) ), _values( values_from_tuple(assignments) )
|
||||
{
|
||||
@ -147,9 +142,10 @@ namespace sqlpp
|
||||
interpretable_list_t<Database> _dynamic_values;
|
||||
private:
|
||||
template< size_t... Indexes >
|
||||
auto columns_from_tuple( detail::index_sequence<Indexes... >, std::tuple<Assignments ...> t ) -> decltype (_columns)
|
||||
auto columns_from_tuple( detail::index_sequence<Indexes... >, std::tuple<Assignments ...> assignments ) -> decltype (_columns)
|
||||
{
|
||||
return decltype(_columns)(std::get<Indexes>(t)._lhs...);
|
||||
(void) assignments;
|
||||
return decltype(_columns)(std::get<Indexes>(assignments)._lhs...);
|
||||
}
|
||||
|
||||
auto columns_from_tuple(std::tuple<Assignments ...> assignments) -> decltype (_columns) {
|
||||
@ -160,6 +156,7 @@ namespace sqlpp
|
||||
template< size_t... Indexes >
|
||||
auto values_from_tuple( detail::index_sequence<Indexes... >, std::tuple<Assignments ...> assignments ) -> decltype(_values)
|
||||
{
|
||||
(void) assignments;
|
||||
return decltype(_values)(std::get<Indexes>(assignments)._rhs...);
|
||||
}
|
||||
|
||||
@ -539,7 +536,7 @@ namespace sqlpp
|
||||
-> _new_statement_t<check_insert_static_set_t<Assignments...>, insert_list_t<void, Assignments...>>
|
||||
{
|
||||
using Check = check_insert_static_set_t<Assignments...>;
|
||||
return _set_impl<void>(Check{}, assignments...);
|
||||
return _set_impl<void>(Check{}, std::make_tuple(assignments...));
|
||||
}
|
||||
|
||||
template <typename... Assignments>
|
||||
@ -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 <typename... Assignments>
|
||||
@ -591,14 +588,6 @@ namespace sqlpp
|
||||
template <typename Database, typename Check, typename... Assignments>
|
||||
auto _set_impl(Check, Assignments... assignments) const -> inconsistent<Check>;
|
||||
|
||||
template <typename Database, typename... Assignments>
|
||||
auto _set_impl(consistent_t /*unused*/, Assignments... assignments) const
|
||||
-> _new_statement_t<consistent_t, insert_list_t<Database, Assignments...>>
|
||||
{
|
||||
return {static_cast<const derived_statement_t<Policies>&>(*this),
|
||||
insert_list_data_t<Database, Assignments...>{assignments...}};
|
||||
}
|
||||
|
||||
template <typename Database, typename... Assignments>
|
||||
auto _set_impl(consistent_t /*unused*/,std::tuple<Assignments...> assignments) const
|
||||
-> _new_statement_t<consistent_t, insert_list_t<Database, Assignments...>>
|
||||
|
Loading…
Reference in New Issue
Block a user