3#include <rpp/observables/details/member_overload.hpp>
4#include <rpp/utils/function_traits.hpp>
17template<constraint::decayed_type Type,
18 constraint::decayed_type TKey,
19 std::invocable<Type> KeySelector,
20 std::invocable<Type> ValueSelector,
21 std::strict_weak_order<TKey, TKey> KeyComparator>
22auto group_by_impl(
auto&& observable, KeySelector&& key_selector, ValueSelector&& value_selector, KeyComparator&& comparator);
24template<constra
int::decayed_type Type,
typename SpecificObservable>
69 template<std::invocable<Type> KeySelector,
70 std::invocable<Type> ValueSelector = std::
identity,
71 typename TKey = rpp::utils::decayed_invoke_result_t<KeySelector, Type>,
72 std::strict_weak_order<TKey, TKey> KeyComparator = std::less<TKey>>
73 auto group_by(KeySelector&& key_selector, ValueSelector&& value_selector = {}, KeyComparator&& comparator = {})
const&
requires is_header_included<group_by_tag, KeySelector, ValueSelector, TKey, KeyComparator>
75 return group_by_impl<Type, TKey>(*
static_cast<const SpecificObservable*
>(
this), std::forward<KeySelector>(key_selector), std::forward<ValueSelector>(value_selector), std::forward<KeyComparator>(comparator));
78 template<std::invocable<Type> KeySelector,
79 std::invocable<Type> ValueSelector = std::
identity,
80 typename TKey = rpp::utils::decayed_invoke_result_t<KeySelector, Type>,
81 std::strict_weak_order<TKey, TKey> KeyComparator = std::less<TKey>>
82 auto group_by(KeySelector&& key_selector, ValueSelector&& value_selector = {}, KeyComparator&& comparator = {}) &&
requires is_header_included<group_by_tag, KeySelector, ValueSelector, TKey, KeyComparator>
84 return group_by_impl<Type, TKey>(std::move(*
static_cast<SpecificObservable*
>(
this)), std::forward<KeySelector>(key_selector), std::forward<ValueSelector>(value_selector), std::forward<KeyComparator>(comparator));
Definition: member_overload.hpp:19