Hi, I recently tried to use a constructor where I wanted to manually give the default argument. In TGraphErrors in the constructor with array pointers, if the pointer is null, it defaults to zero-values. I tried giving 0 or ROOT.NULL, etc, but nothing works. I ended up manually filling an array of zeros to give to the constructor. I couldn’t just let the machine use the default argument because I was using non-default values for later arguments.
What is the best way to provide a NULL/nullptr to a ROOT constructor or function, or a null-but-typed pointer? Is there a way to generate one on the ROOT side?
I found this four-year-old post: [url]How to pass a NULL pointer as a function argument? talking about this, and one of the solutions was using named arguments to allow out-of-order function signatures. This would allow me to specify non-default values for later arguments while retaining the default null values for preceding arguments. Has anything been done to implement this? I’d very much be in favour of auto-generated named arguments from the ROOT source.
Jean-François