Do not rely on compiler-generated copy constructors for objects which have container members such as Container<>, LinkedList<>. The copy constructors of those containers have unsafe copy routines, at the benefit of type-tolerance, that could result in memory violations.
Further improvements can be made to introduce an internal push_back() operation that is strictly typed (non-templated) to eliminate this imcompatibility.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment