identifier before function call

what is the meaning of identifier before function call in this example? i mean that in syntax context

1
2
    // Create a stack-allocated handle scope.
    HandleScope handle_scope(isolate);


thanks
Last edited on
That's not a function call. It's defining and initialising an object called handle_scope, of type HandleScope, passing in isolate as an argument to the constructor.
Last edited on
There are two possibilities:

One: isolate is the name of a type
HandleScope handle_scope(isolate);
declares the function handle_scope with HandleScope as the return type and isolate as the argument type.

Two: isolate is the name of a non-type
HandleScope handle_scope(isolate);
defines an object handle_scope of type HandleScope directly initialised with isolate
Topic archived. No new replies allowed.