Click to See Complete Forum and Search --> : auto_ptr in exception safety design


George2
March 29th, 2008, 05:54 AM
Hello everyone,


What I am confused is about,

http://www.gotw.ca/gotw/059.htm

--------------------
Indeed, often the best way to implement the Pimpl idiom is exactly as shown in Example 4 above, by using a pointer (in order to take advantage of nonthrowing operations) while still wrapping the dynamic resource safely in an auto_ptr manager object. Just remember that now your object must provide its own copy construction and assignment with the right semantics for the auto_ptr member, or disable them if copy construction and assignment don't make sense for the class.
--------------------

1. What means "the right semantics for the auto_ptr member"?

2. "disable" means for the class, copy construction and assignment are not needed? Curious. Never thought of a class which does not need that two basic functions. :-)


thanks in advance,
George