0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Remove same-name check for result columns

The compiler actually does a much better job at telling you if two
result columns have the same name as soon as you are trying to use
them.
In contrast to the static_assert, the compiler will even say which
name is ambiguous.
This commit is contained in:
Roland Bock 2021-10-03 09:35:11 +02:00
parent 136b533fcf
commit a3c2b186fb

View File

@ -424,10 +424,6 @@ namespace sqlpp
auto _columns_impl(consistent_t /*unused*/, std::tuple<Args...> args) const auto _columns_impl(consistent_t /*unused*/, std::tuple<Args...> args) const
-> _new_statement_t<consistent_t, select_column_list_t<Database, Args...>> -> _new_statement_t<consistent_t, select_column_list_t<Database, Args...>>
{ {
static_assert(not detail::has_duplicates<Args...>::value, "at least one duplicate argument detected");
static_assert(not detail::has_duplicates<typename Args::_alias_t...>::value,
"at least one duplicate name detected");
return {static_cast<const derived_statement_t<Policies>&>(*this), return {static_cast<const derived_statement_t<Policies>&>(*this),
typename select_column_list_t<Database, Args...>::_data_t{args}}; typename select_column_list_t<Database, Args...>::_data_t{args}};
} }