Hey all.
I have not done much C++ in the past 20 years or so. A lot has changed since my college days.
I ran across some C++ syntax today that I was not able to figure out. Not even sure what it's called. So, I'm hoping that someone might be able to explain to me what it is, or at least point me in the right direction where I can read up on it....
Here is the code.
1 2 3 4 5 6 7 8 9
|
// Define and parse command-line arguments.
CmdParserCommon cmdparser(argc, argv);
CmdOption<bool> reverse_sort(cmdparser,0,"reverse-sort","","performs descending
sort (default is ascending).",false);
CmdOption<int> array_size(cmdparser,'s',"size","<integer>","input/output array
size.",33554432);
cmdparser.parse();
|
What exactly is CmdOption<bool> and CmdOption<int>
They look like return types, but, are they? There are not return variables being defined. Resembles a function declaration, yet it's not.
Are they some kind of function attributes?
I had a friend who knows a lot more about C++ than I do, he was kind of stumped as well.
Hoping someone can shed some light on this C++ wizardry. :D