C++ Logo

std-discussion

Advanced search

Slight inconsistency in naming sections in member functions of some classes in the standard

From: Semushin Sergey <sergeysemushin1990_at_[hidden]>
Date: Mon, 1 Mar 2021 20:57:05 +0300

So I noticed that a section which describes member-functions such as size, empty… for containers/views seems to be generally named “capacity”. I believe it is true for almost everything in containers library except for span and also true for string/string_view. However for span it is named “observers” which is common section name for const member-functions in classes outside of containers library as far as I can tell. It would probably make more sense due to this section having only const member-functions for span but string_view which is very similar to span  still has it named “capacity”. The other thing I found is std::match_results from regexp library which also has similar section but named “size”.

 

So my questions are: Is it really unintentional inconsistency in your opinion and should be fixed (probably renamed to capacity)? Does this type of stuff even matter and worth sending defect report about, since it mostly doesn’t concern the end user, except maybe when viewing e.g. cppreference which reproduces those names from the standard?

 

Received on 2021-03-01 11:57:11