gcc/testsuite/g++.dg/template/parm-cv2.C
raw| 1 | // PR c++/51851 |
| 2 | |
| 3 | template<class T> |
| 4 | struct A |
| 5 | { |
| 6 | typedef double Point[2]; |
| 7 | virtual double calculate(const Point point) const = 0; |
| 8 | }; |
| 9 | |
| 10 | template<class T> |
| 11 | struct B : public A<T> |
| 12 | { |
| 13 | virtual double calculate(const typename A<T>::Point point) const |
| 14 | { |
| 15 | return point[0]; |
| 16 | } |
| 17 | }; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | B<int> b; |
| 22 | return 0; |
| 23 | } |