
4 Dec
2008
4 Dec
'08
4:50 p.m.
AMDG Hicham Mouline wrote:
Like this?
class C : public boost::noncopyable { public: ... clone() const { ... } private: C( const C& rhs ) { .... } };
... instance c1 of C exists here ....
What possible return types of clone() const are possible? .A native reference .An auto_ptr
auto_ptr makes more sense than a reference because the copy needs to be allocated on the heap. In Christ, Steven Watanabe