www.digitalmars.com         C & C++   DMDScript  

c++.beta - typedef

template <typename T>
class A
  typedef T a, b, c;

  a operator ()( b const &x, c const &y ) const;
  // Error: operator overload must be a function

  a i1;
  b i2;
  // Error: 'b' is already defined
  c i3;
  // Error: 'c' is already defined

int main()
  A<int> a;

  a(0, 1);
  // Error: no match for function 'operator()(int ,int )'

  return 0;

Extracted from Boost's math library.

bye, Christof

http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de

...and what have you contributed to the Net?
Jun 09 2003