13 Apr
2016
13 Apr
'16
1:40 p.m.
On 04/13/2016 02:02 AM, Robert Ramey wrote:
LOL - it's ALWAYS obvious to the author.
But think about it. If I want to use root_ptr<T> what are the requirements on T. Does it have to be copiable?, movable?, default constructable?. Does it have to support any special calls. Does it have to support delete T. What if T is an array, will it still work? Can T be a constant? For what kinds of T will code fail to compile? Can I copy a root_ptr<T> to T* ? What about vice versa?
Documenting the type requirements will go a long way toward addressing the reservations previously raised.
Good point ;)