Going through the book C++ Primer 5th edition, I am confused as to what the syntax is exactly saying. Particularly, I'm curious about the empty () after template parameter list in less<> and hash<>.
hash<string>()(s.bookNo); // () after <string>
less<T>()(v1, v2);
I am guessing it creating a function insantiation and passing parameters in the last set of () i.e. (s.bookNo)
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire