Why is there no boost::copy_on_write_ptr?
问题 I just saw this nice copy-on-write pointer implementation. It looks pretty generic and useful, so my question is: Is such a class contained in any of the C++ toolkits (boost, loki, etc.)? If not, I'd really like to know why because it is a really useful idiom and apparently a generic implementation seems doable (like the one I linked to). 回答1: There was a lot of debate over the possibility, and at least one suggested version of what eventually came out as auto_ptr was for a reference counted