c++ - STL size_type(-1) vs size_t(-1) -


in c++ stl implementation, see code block:

size_type max_size() const {     return size_type(-1); } 

i understand works when size_type size_t. purpose of adding indirect level here? i.e. why not use size_t(-1) directly in max_size()?

is there specification says (size_type(-1)) should evaluate maximum object size on platform)...


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -