Skip to content

Commit

Permalink
Update DataTable
Browse files Browse the repository at this point in the history
  • Loading branch information
morzhovets committed Jul 18, 2024
1 parent 6cfda0e commit ed5aedf
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions include/momo/DataTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ class DataTable
}

template<typename... Items>
internal::EnableIf<(sizeof...(Items) > 1),
internal::EnableIf<(sizeof...(Items) != 1),
ConstSelection> Select(Equality<Items>... equals) const
{
return pvSelect<Selection>(EmptyRowFilter(), equals...);
Expand All @@ -764,14 +764,13 @@ class DataTable
template<typename RowFilter = EmptyRowFilter,
typename... Items>
internal::EnableIf<internal::IsInvocable<const RowFilter&, bool, ConstRowReference>::value,
ConstSelection> Select(Equalities<Items...> equals = {},
const RowFilter& rowFilter = RowFilter()) const
ConstSelection> Select(Equalities<Items...> equals, const RowFilter& rowFilter = RowFilter()) const
{
return pvSelect<Selection>(equals, rowFilter);
}

template<typename... Items>
internal::EnableIf<(sizeof...(Items) > 1),
internal::EnableIf<(sizeof...(Items) != 1),
Selection> Select(Equality<Items>... equals)
{
return pvSelect<Selection>(EmptyRowFilter(), equals...);
Expand All @@ -787,13 +786,13 @@ class DataTable
template<typename RowFilter = EmptyRowFilter,
typename... Items>
internal::EnableIf<internal::IsInvocable<const RowFilter&, bool, ConstRowReference>::value,
Selection> Select(Equalities<Items...> equals = {}, const RowFilter& rowFilter = RowFilter())
Selection> Select(Equalities<Items...> equals, const RowFilter& rowFilter = RowFilter())
{
return pvSelect<Selection>(equals, rowFilter);
}

template<typename... Items>
internal::EnableIf<(sizeof...(Items) > 1),
internal::EnableIf<(sizeof...(Items) != 1),
size_t> SelectCount(Equality<Items>... equals) const
{
return pvSelect<size_t>(EmptyRowFilter(), equals...);
Expand All @@ -809,8 +808,7 @@ class DataTable
template<typename RowFilter = EmptyRowFilter,
typename... Items>
internal::EnableIf<internal::IsInvocable<const RowFilter&, bool, ConstRowReference>::value,
size_t> SelectCount(Equalities<Items...> equals = {},
const RowFilter& rowFilter = RowFilter()) const
size_t> SelectCount(Equalities<Items...> equals, const RowFilter& rowFilter = RowFilter()) const
{
return pvSelect<size_t>(equals, rowFilter);
}
Expand Down Expand Up @@ -1368,12 +1366,6 @@ class DataTable
VersionKeeper(&mCrew.GetRemoveVersion()));
}

template<typename Result, typename RowFilter> // vs2015
Result pvSelect(const Equalities<>& /*equals*/, const RowFilter& rowFilter) const
{
return pvSelect<Result>(rowFilter);
}

template<typename Result, typename... Items, typename RowFilter>
Result pvSelect(const Equalities<Items...>& equals, const RowFilter& rowFilter) const
{
Expand Down

0 comments on commit ed5aedf

Please sign in to comment.