Skip to main content
GameDev.net gamedev.net
🔒 Locked

Boost:::Function Operation

Started by DudeMiester May 6, 2006 at 3:59 PM 0 replies 1.2k views
Original Post
DudeMiester
DudeMiester
I'm studying the boost library to expand my knowledge of C++, but I'm confused on one point. In Boost::Function it states that it operated by function cloning. I'm not exactly sure what they mean my this. Is it that they hold an interal copy of whatever function object you set it to? If so, then how do they deal with functions that arn't function objects? Do they wrap them up as a function object, and then store an internal copy of that? I've tried reading the source code, but given I don't fully understand the library, I find it utterly incomprehensible. Hopefully, I can get some clairification here. EDIT: Reading a bit further it appears to me that I am correct, and that additionally those internal copies are stored on the heap. Although, if someone could verify this it would be nice.
[s] [/s]
I can see the fnords.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.