Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / template / operator1.C
blob402e607d1e4fd789b9eebe7033cc25733e0f16b7
1 class test
3 public:
4  float operator[]( int index )
5  {
6   return testFloat[index];
7  }
8 private:
9  float testFloat[3];
12 template < class typeA > float
13 operator*(
14  typeA a,
15  float b
18  return a[0] * b;
21 template < class typeB > float
22 operator*(
23  float a,
24  typeB b
27  return a * b[0];
30 template < class typeA, class typeB > float
31 operator*(
32  typeA a,
33  typeB b
36  return a[0] * b[0];
39 int main( void )
41  test aTest;
42  float bTest;
43  float result;
45  result = aTest * bTest;
46  result = bTest * aTest;
48  return 0;