Nov 26, 2023

[C++] C++17 : C++20 Diff

Reference:
Changes between C++17 and C++20 DIS: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2131r0.html


P0692R1 Access checking on specializations

This change fixes a long-standing, somewhat obscure situation, where it was not possible to declare a template specialization for a template argument that is a private (or protected) member type. For example, given class Foo { class Bar {}; };,
the access Foo::Bar is now allowed in
template<class> struct X;
template<> struct X<Foo::Bar>;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.