OSDN Git Service

6c5e8ac7022ccd0998bf539790bd6b2b70dd8c13
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / local6.C
1 template <class T> struct PCVector2 // { dg-message "candidate is" }
2 {
3     template <class T2> PCVector2(const PCVector2<T> &cv) ;
4
5     PCVector2<T> operator- (const PCVector2<T> &ov) const 
6         { 
7           return PCVector2<T>(ov.xFIELD, ov.yFIELD); // { dg-error "matching" }
8         }
9
10     T xFIELD, yFIELD;
11 };
12
13 void findIntersection( PCVector2<double>& p0, PCVector2<double>& p1);
14
15
16 void findIntersection( PCVector2<double>& p0, PCVector2<double>& p1)
17 {
18     PCVector2<double> e = p1 - p0;      // { dg-message "instantiated" }
19 }