How to call opCall as template?

Namespace rswhite4 at googlemail.com
Thu Jan 30 08:28:41 PST 2014


On Thursday, 30 January 2014 at 16:24:00 UTC, Stanislav Blinov 
wrote:
>> void main() {
>> 	F f;
>> 	int i = f(3,4,5);
>> 	float f_ = f!float(6, 7, 8);
>> }
>> ----
>>
>> Does not work, it fails with:
>> Error: template instance f!float f is not a template 
>> declaration, it is a variable
>
> f.opCall!float(6, 7, 8);

... Yes, of course. But where is the sense to use opCall if I 
need to call it explicitly?


More information about the Digitalmars-d-learn mailing list