[
https://issues.apache.org/jira/browse/MINIFICPP-2642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marton Szasz updated MINIFICPP-2642:
------------------------------------
Description:
Replacing calls with invoke where invocable is used.
[https://en.cppreference.com/w/cpp/concepts/invocable]
The invocable concept checks that type F can be called with arguments Args...
using std::invoke. Std::invoke is more general than a direct function call: it
supports member function and data member pointers too, where the first
"argument" is the object.
In theory, if we checked for invocable but called directly, someone could pass
a member pointer as the callback, and it would pass the concept check but fail
to build.
> std::invocable should be used with std::invoke
> ----------------------------------------------
>
> Key: MINIFICPP-2642
> URL: https://issues.apache.org/jira/browse/MINIFICPP-2642
> Project: Apache NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Marton Szasz
> Assignee: Marton Szasz
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Replacing calls with invoke where invocable is used.
> [https://en.cppreference.com/w/cpp/concepts/invocable]
> The invocable concept checks that type F can be called with arguments Args...
> using std::invoke. Std::invoke is more general than a direct function call:
> it supports member function and data member pointers too, where the first
> "argument" is the object.
> In theory, if we checked for invocable but called directly, someone could
> pass a member pointer as the callback, and it would pass the concept check
> but fail to build.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)