Date: 2001-04-05 12:12:32
>>>>> "Thomas" == Thomas Maeder <maeder_at_[hidden]> writes:
Thomas> nbecker_at_[hidden] wrote:
>> generate<iter, gen&> (start, end, g);
Thomas> This wasn't your question, but: it's not very clear if this is legal. The
Thomas> generate algorithm as documented in §25.5.6 clearly requires a function
Thomas> object to be passed. A function object is defined in §25 (rather implicitly,
Thomas> though) to be either a pointer to function or an object with an
Thomas> appropriately overloaded operator(). A reference is not an object in C++.
Interesting. Actually, I found this technique in "The C++ Standard Library",
Nicolai M. Josuttis.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk