Date
2007-11-30.00:00:00
Message id
3686

Content

In contrast to the proposed std::shared_ptr, std::unique_ptr does currently not support incomplete types, because it gives no explicit grant - thus instantiating unique_ptr with an incomplete pointee type T automatically belongs to undefined behaviour according to [res.on.functions]/2, last bullet. This is an unnecessary restriction and prevents many well-established patterns - like the bridge pattern - for std::unique_ptr.