I use the ROOT C ++ libraries (root.cern.ch) daily and looked at the source code when I came across this function declaration:
TString TString::Format(const char *va_(fmt), ...) {
You can find it here.
I do not understand how const char *
can have an argument or brackets in its name. The va_(fmt)
expression is later used as a simple const char *
, although it looks like a function call or constructor. At first I thought that this was due to a variable list of arguments, which was also new to me, but reading the documentation for stdarg.h did not help at all in this matter.
Itβs very difficult for Google to help, as Iβm not quite sure what to call it. Declaration with an argument? This does not give good results.
I used to think I know C ++, but what happens here? All help would be appreciated.
Simon source share