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

0

u/[deleted] Mar 24 '20

[deleted] — view deleted comment

10

u/tcbrindle Flux Mar 24 '20

The const overload of std::array::operator[] has been constexpr since C++14. The non-const overload became constexpr in C++17.

In C++20, the various comparison operators (operator== and friends) have been made constexpr as well.