F
flounder
The compiler is unable to find a match for the call to munge() and
operator==() in is_equal() below. Can someone post an explanation and/
or suggest a workaround?
Thanks!
template<class T>
struct Foo {
struct Bar {};
};
template<class T>
bool operator==(const typename Foo<T>::Bar&, const typename
Foo<T>::Bar&);
template<class T>
void munge(typename Foo<T>::Bar* );
inline bool
is_equal(Foo<int>::Bar x, Foo<int>::Bar y)
{
munge(&x);
return x == y; // no operator "==" matches these operands
}
operator==() in is_equal() below. Can someone post an explanation and/
or suggest a workaround?
Thanks!
template<class T>
struct Foo {
struct Bar {};
};
template<class T>
bool operator==(const typename Foo<T>::Bar&, const typename
Foo<T>::Bar&);
template<class T>
void munge(typename Foo<T>::Bar* );
inline bool
is_equal(Foo<int>::Bar x, Foo<int>::Bar y)
{
munge(&x);
return x == y; // no operator "==" matches these operands
}