gcc/testsuite/g++.old-deja/g++.robertl/eb3.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-skip-if "requires hosted libstdc++ for complex" { ! hostedlib } } |
| 3 | #include <complex> |
| 4 | template<class T> |
| 5 | class Vec { |
| 6 | public: |
| 7 | Vec() { data = new T; } |
| 8 | Vec<T> split() { Vec<T> tmp; operator=(tmp); return tmp; } |
| 9 | void operator=(const Vec<T> &v) { data = new T; } |
| 10 | T *data; |
| 11 | }; |
| 12 | template class Vec<std::complex<double> >; |