Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.old-deja/g++.law/visibility13.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line diff
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility13.C Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/testsuite/g++.old-deja/g++.law/visibility13.C Thu Oct 25 07:37:49 2018 +0900 @@ -15,9 +15,11 @@ const int ArraySize = 12; +template <class> class Array_RC; + template <class Type> -class Array { // { dg-error "" } .struct Array_RC redecl.* -friend class Array_RC; +class Array { + friend class Array_RC<Type>; public: Array(const Type *ar, int sz) { init(ar,sz); } virtual ~Array() { delete [] ia; } @@ -76,8 +78,8 @@ template <class Type> Type &Array_RC<Type>::operator[](int ix) { - assert(ix >= 0 && ix < size);// { dg-error "" } member .size.* - return ia[ix];// { dg-error "" } member .ia.* + assert(ix >= 0 && ix < this->size); + return this->ia[ix]; } // ------------------- Test routine ----------------------