mercredi 30 novembre 2016

C++ std:.auto_ptr or std::unique_ptr (to support multiple compilers, even old C++03 compilers)?

I'm trying to update some C++ code, I'd like to move toward a more modern code (c++11), but I still need to compile the code with some older compilers (c++03 compliant), because of supported platform constraints.

I know in C++11 compilers std::auto_ptr is deprecated, but because of the older compiler support, I can't just replace them with std::unique_ptr.

Is there a good practice to handle this "old compiler support, but start to move to C++11"?

Aucun commentaire:

Enregistrer un commentaire