c++ - Function References -


So I was working with Function Pointsers and I remembered that you can:

< Pre> zero fu () {} int main () {zero (& fancy) () =) Foo; Ceremony (); //: Fu (); }

The obvious reference is that reference references are valid objects (unless they are being misused) or in this case the function.

The obvious disadvantage is that you store an array of references and members can not use them for function poinchers (at least as far as I can tell).

My question: uses it to anyone (i.e., function reference , not function pointer), and If so, in what situations have you found them useful / useful?

While working with conditional compilation in only one place, they are bound to refer to a specific function to be useful with the bat.

"post-text" itemprop = "text">


Comments