Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.old-deja/g++.jason/template40.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do run } // PRMS id: 11315 // Bug: g++ doesn't recognize the copy ctor for Array<long>. template <class Type> class Array { public: Array(int sz=12) : ia (new Type[sz]), size(sz) {} ~Array() { delete[] ia;} Array(const Array<long>& r) : size(0) {} // just for testing private: Type *ia; int size; }; int main(int argc, char *argv[]) { Array<long> ia; // looping occurs on this line }