10 struct ChunkByFunction;
12 template<
typename Con,
typename Pred>
13 concept CustomChunkBy = concepts::TagInvocable<ChunkByFunction, Con, Pred>;
15 template<
typename Con,
typename Pred>
16 concept ViewChunkBy =
requires(Con&& container, Pred&& predicate) {
17 ChunkByView { util::forward<Con>(container), util::forward<Pred>(predicate) };
20 struct ChunkByFunction {
21 template<concepts::ViewableContainer Con,
typename Pred>
22 requires(CustomChunkBy<Con, Pred> || ViewChunkBy<Con, Pred>)
23 constexpr auto operator()(Con&& container, Pred&& predicate)
const -> concepts::View
auto {
24 if constexpr (CustomChunkBy<Con, Pred>) {
25 return function::tag_invoke(*
this, util::forward<Con>(container), util::forward<Pred>(predicate));
27 return ChunkByView { util::forward<Con>(container), util::forward<Pred>(predicate) };
constexpr auto chunk_by
Definition chunk_by.h:33
ChunkByView(Con &&, Pred) -> ChunkByView< meta::AsView< Con >, Pred >
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22
constexpr auto curry_back
Definition curry_back.h:141
Definition any_storable.h:9