() syntax when passing as argument to function

Jun 17, 2015 at 12:12am
Hello,
What is the syntax '()' e.g in 'ZeroFunction<2>()' when it is passed as argument to a function.
ZeroFunction is a class. Is it a call of constructor?
If so, then what happens when it is passed to a function?
Here is a code example:
 
interpolate_boundary_values (dof_handler,0, ZeroFunction<2>(), boundary_values); 

Thank you.
Jun 17, 2015 at 1:17am
If ZeroFunction is a class, yes it would call the constructor.

It is basically the same as:
1
2
ZeroFunction<2> tmp;
interpolate_boundary_values (dof_handler,0, tmp, boundary_values);
Jun 18, 2015 at 5:07pm
Thank you!
Topic archived. No new replies allowed.