boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
100 stars 116 forks source link

Fix docs for static_vector::max_size() and capacity() #127

Closed logan-5 closed 4 years ago

logan-5 commented 5 years ago

The documentation for static_vector::max_size() and static_vector::capacity() list them as static member functions; however, they are actually implemented as non-static const member functions. This PR fixes this discrepancy by changing the documentation to match the implementation.

The alternative would be to change the implementations to be static (which they could be, since for static_vector<T, N>, both simply return N). However, this is difficult due to the way static_vector is implemented (it inherits these member functions from vector), and besides, there already exists static_vector::static_capacity to accomplish the same thing statically.

igaztanaga commented 4 years ago

The intention was to make them static, so I've changed the implement to reflect what the documentation states. Thanks for the report!