Using Smart pointers to avoid coding certain class methods?

Had an idea as I was coding up an object-oriented wrapper for an SDL c library. Firstly I found it very annoying for maintaining dynamically allocated variables (heap), that is I had to to explicitly write a copy constructor and an overloaded assignment member for each class. Found this very tedious and a tiring task.. I understand that a smart pointer supports bound checking and resource management, can I use this as a member variable of class such that when either the default copy constructor or overloaded assignment member is invoked pointer members perform a deep copy on its subjects as opposed to a member wise copy?
Doesn't that depend on how you implement a smart pointer?
Haven't actually looked into it, but that sounds about right
Topic archived. No new replies allowed.