samedi 23 juillet 2016

std::shared_ptr templated vs. non-templated copy/move constructors

This page shows that std::shared_ptr has a templated and a non-templated version of copy/move constructors ((9) and (10) on the page). Similarly, it also has two versions of copy/move assignment operator (see here).

Why do we need the non-templated version? Wouldn't the templated version alone suffice?

Aucun commentaire:

Enregistrer un commentaire