Original Post
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.