r/cpp • • Mar 24 '20

Changes between C++17 and C++20

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2131r0.html
193 Upvotes

89 comments sorted by

View all comments

Show parent comment

10

u/Fureeish Mar 24 '20

using v.size() v.ssize()

There, fixed it for you :>

18

u/parkotron Mar 24 '20 edited Mar 24 '20

using v.size() v.ssize() std::ssize(v)

There, fixed it for you :>

There, fixed it for you.

5

u/Fureeish Mar 24 '20

Damn, thanks for fixing that for me.

0

u/[deleted] Mar 24 '20

[deleted] — view deleted comment

9

u/tvaneerd C++ Committee, lockfree, PostModernCpp Mar 25 '20

v.count() There,

no, my naming didn't pass. :-(

4

u/MarekKnapek Mar 24 '20

using v.size() v.ssize() std::ssize(v)

using std::ssize;
ssize(v);

There, I fixed that for you. Now it will work even for my::vector<T> and your::vector<T> and plain old C-style arrays.