Hi

what's wrong about the following code? It does not compile.

template <typename T>

class A {

public:

class B;

};

template <typename T>

bool

operator==(const typename A<T>::B &lhs, const typename A<T>::B &rhs);

template <typename T>

bool

operator!=(const typename A<T>::B &lhs, const typename A<T>::B &rhs);

template <typename T>

class A<T>::B

{

public:

friend bool

operator==<>(const B &lhs, const B &rhs);

friend bool

operator!=<>(const B &lhs, const B &rhs);

};

template <typename T>

bool

operator==(const typename A<T>::B &lhs, const typename A<T>::B &rhs)

{

return true;

}

template <typename T>

bool

operator!=(const typename A<T>::B &lhs, const typename A<T>::B &rhs)

{

return false;

}

int

main()

{

A<int>::B b;

b == b;

}

regards,

Alex