I just read
Add implicit conversion from unique_ptr<T> to T*
which focuses on the how-to-do-it part, not on should-I-do-it. I'm also not asking whether or not you think it's a good idea, but I am asking for concrete pitfalls I might stuble onto, or into, if I subclass unique_ptr
to add the functionality of implicit conversion to a raw pointer (so I could just pass it directly to functions taking pointers, without using get()
).