operator overloading

O

osmium

Johan said:
What does overloading operator () exactly do ?.

The buzz word you need to know to learn more is functor. Aka function
object. A few minutes of googling didn't turn up anything I really liked.
(Wikipedia seems to be down - not a good start). If you have access to a
decent technical library the best write up I know of is in _Mastering
Object-Oriented Design ion C++_ by Horstmann, p. 220.

Note that this is the only way you can have a comma in the argument list.

I found these two links, don't really like either one of them, but they were
the only two of the first thirty or so hits that even seemed worth saving.

http://www.free-web-template.org/fu/functor.html

http://www.sgi.com/tech/stl/functors.html
 
R

rami

Andrei Alexandrescu's Generic Programming is the best book i have read
about the techniques used with templates to generalize your approach.
It has a detailed chapter on functors.

Also if you ae actually looking for functors you may find good
tutorials in boost library.
Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top