Jump to content
  • Advertisement
Sign in to follow this  
DudeMiester

Boost:::Function Operation

This topic is 4551 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!