|
Boost : |
Subject: Re: [boost] [review][Fit] Review of Fit starts today : September 8 - September 17
From: P F (pfultz2_at_[hidden])
Date: 2017-09-17 23:07:27
> On Sep 17, 2017, at 5:13 PM, Robert Ramey via Boost <boost_at_[hidden]> wrote:
>
> A couple of questions:
>
> 1)
>
> It seems to be that this library only applies to function objects. Is this impression correct?
No.
> I get this impression from the "getting started" and other material and I'm fine with this.
The âgetting startedâ uses function objects because they are more powerful, but only a few adaptors are limited to a function object. Each adaptor is documented whether it takes a function object or a âCallableâ.
> But when I go to the reference for is_callable I find:
>
> "The is_callable metafunction checks if the function is callable with certain parameters."
>
> which seems to suggest that this meta function would work as expected when passed a pointer to a function. If it's to apply only to function objects, I would expect the above to read:
>
> "The is_callable metafunction checks if the function object is callable with certain parameters.â
The documentation for `is_callable` states that "F must be Callableâ, with a link to the âCallableâ definition.
>
> 2)
>
> I wonder about some names. In some cases it seems that the library provides some C++17 functionality under a different name:
>
> is_callable ?-> std::is_invocable
> http://en.cppreference.com/w/cpp/utility/functional/invoke
>
> apply ?-> std::invoke
> http://en.cppreference.com/w/cpp/utility/functional/invoke <http://en.cppreference.com/w/cpp/utility/functional/invoke>
Yes, those need to be renamed as Vicente pointed out as well. I have an issue for this rename here:
https://github.com/pfultz2/Fit/issues/171
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk