What's the difference between raw function pointer vs boost::bind pointer return value?
Asked
Active
Viewed 514 times
0
-
2Not sure what answer you expect. What’s the difference between an elefant and five oranges? – Konrad Rudolph Jan 09 '13 at 13:44
-
2@KonradRudolph the elephant can be pink, whereas oranges cannot. – Stephane Rolland Jan 09 '13 at 13:48
-
@KonradRudolph an elephant can contain five oranges in itself, whereas oranges cannot contain elephant inside themselfs ;) – westwood Jan 09 '13 at 13:56
-
2@StephaneRolland: Cara cara navel variety of oranges has a pinkish flesh, granted they are not pink on the outside, but maybe they are not so different from elephants deep inside. – David Rodríguez - dribeas Jan 09 '13 at 14:21
1 Answers
4
bind
does not return a pointer at all. It returns an object containing a function pointer and the bound arguments, with an overloaded operator()
that can be used to call it like a function.
So the main difference is that the result of bind
stores the values you want to bind to function arguments; a raw pointer doesn't store anything.

Mike Seymour
- 249,747
- 28
- 448
- 644