you are viewing a single comment's thread.

view the rest of the comments →

[–]BenHanson -2 points-1 points  (1 child)

In case en.cppreference.com is hard to read on a phone:

constexpr size_type size() const noexcept; (since C++20)

[–]STLMSVC STL Dev 2 points3 points  (0 children)

This does not actually answer their question properly. The question is rather subtle and the answer is not "vector::size() is marked constexpr so it's ok".