On Aug 17, 2008, at 4:09 AM, Alex wrote:
>> From looking at the example, it seems I have to use classes/structs
>> to copy
> the data into a map. Is this correct? Or, can I just use a simple
> or something?
The construct is called a functor:
Functors have several advantages over function pointers, which is why
they're used throughout STL. This feature of MySQL++ is modeled on
STL algorithms like find_if().
It's true, they're rather heavy on the syntactic noise. If C++
supported anonymous (lambda) functions, we'd use them instead in
places like this, but it doesn't, so we use functors.