From http://www.cplusplus.com/reference/utility/pair/ we know std::pair has two member variables, first
and second
.
As far as I know, it will be better if encapsulating two member variables above and giving a getFirst();
and getSecond();
, so why does STL design like that?
Aucun commentaire:
Enregistrer un commentaire