What of the following is the equivalent statement for the functor call,

x = f(arg1, arg2);

where f is a functor and arg1 and arg2 are the arguments required by the functors?
a) f.call(arg1, arg2);
b) f.operator()(arg1, arg2);
c) f.operator(arg1, arg2);
d) f.operator(arg1, arg2)();

1 thought on “What of the following is the equivalent statement for the functor call,”

  1. b
    Explanation: f(arg1, arg2) means we are calling the overlaoded () operator method which can be called using object f as follows f.operator()(arg1,arg2); In general, object.operator()(argument_lists);

Leave a Comment