What is this function call operator?
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Aug 27 10:56:14 PDT 2015
On Thursday, 27 August 2015 at 16:12:35 UTC, Adam D. Ruppe wrote:
> On Thursday, 27 August 2015 at 16:03:58 UTC, Gary Willoughby
> wrote:
>> Sorry, I mean the three dots '...' that seems to be what the
>> documentation is referring to. Also the `isCallable` template
>> uses it.
>
> That just means it can take whatever arguments. The
> documentation is just saying it is callable with anything; the
> ... is a placeholder. In the template itself, (T...) is a
> variadic argument list, again meaning it can take anything.
> (The reason isCallable does it though isn't to actually take
> multiple arguments, it is so it can take any *kind* of
> argument; a bit of a hack.)
Ah right, I get it. Thanks.
More information about the Digitalmars-d-learn
mailing list