I'm asking this because im developing a class library. (As i can see in cplusplus.com) in C++98 we had only one version from the resize
funcion:
void resize (size_type n, value_type val = value_type());
this way the function works if you want to specify the second argument or not. But in C++11 they change it to 2 different version:
void resize (size_type n);
void resize (size_type n, const value_type& val);
Is any special reason for this?
Aucun commentaire:
Enregistrer un commentaire