Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/template/memfriend18.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// PR c++/87571 template <class> struct A { template <class> struct B { template <class> friend class B; protected: int protected_member_; public: template <class T> int method(const B<T>& other) const { return other.protected_member_; } }; }; int main() { A<int>::B<int> a; A<int>::B<char> b; a.method(b); }