[Cs3] CSIII - Question about bind.
Mikhail Nesterenko
mnestere at kent.edu
Sun Sep 29 09:22:54 EDT 2024
>
> I am writing this email to ask for some clarification regarding the bind function. According to the slides, bind is a specialized function that creates a function by assigning (binding) a value of parameter of another function. However, upon reading the documentation of bind from these two C++ documentation websites:
>
> https://cplusplus.com/reference/functional/bind/
> https://en.cppreference.com/w/cpp/utility/functional/bind
>
> It is stated that bind returns a functor which is based on the input callable object(function ptr, functor, lambda), and the other supplied arguments.
As per https://en.cppreference.com/w/cpp/utility/functional/bind
binds accepts a callable object (functon ptr, etc) as the first
argument and returns a function object of unspecified type.
Thanks,
--
Mikhail
> Is the way bind() is described on these two documentation websites mean that the definition in the slides is incorrect because bind returns functor and not necessarily a function?
> Or is the definition in the slides correct but just doesn't mention the functor part?
>
> Thank you and all the best,
> Connor Blaha
>
>
>
>
More information about the cs3
mailing list