[
https://issues.apache.org/jira/browse/MINIFICPP-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386163#comment-17386163
]
Marton Szasz edited comment on MINIFICPP-1289 at 7/23/21, 11:11 AM:
--------------------------------------------------------------------
I forgot to reply to this, but I guess better late than never. The error
message is about the lambda type not satisfying the Sentinel concept. Actions
can't be used with the | operator. Try
ranges::actions::sort(matched_files_with_mtime, first_by_mtime_then_by_name);.
The Sentinel concept is a generalization of end Iterators where the start and
the end don't need to be of the same type, they only need to be comparable with
!=. This allows using iterator-like constructs for things of unknown bound,
like a null-terminated string or even an infinite range. Ranges are now defined
by an iterator (begin) and sentinel (end) pair. Read more:
https://www.foonathan.net/2020/03/iterator-sentinel/
Now that the language upgrade is near the finishing line, I would say wait
until it's in and go for the latest range-v3. We can't go directly for
std::ranges, because it's not yet implemented in libstdc++ 8.x, which we still
need to support to keep compatibility with debian buster.
was (Author: szaszm):
I forgot to reply to this, but I guess better late than never. The error
message is about the lambda type not satisfying the Sentinel concept. Actions
can't be used with the | operator. Try
ranges::actions::sort(matched_files_with_mtime, first_by_mtime_then_by_name);.
Now that the language upgrade is near the finishing line, I would say wait
until it's in and go for the latest range-v3. We can't go directly for
std::ranges, because it's not yet implemented in libstdc++ 8.x, which we still
need to support to keep compatibility with debian buster.
> Add range-v3
> ------------
>
> Key: MINIFICPP-1289
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1289
> Project: Apache NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Marton Szasz
> Priority: Minor
> Labels: MiNiFi-CPP-Hygiene
>
> Useful library to raise the level of abstraction from iterators to ranges and
> provide useful related concepts.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)