B
beclan
Hello,
Does any of you guys how to solve the following ambiguity?
Consider the following class declaration snippet:
class Foo {
:
public:
SomeDataType& operator [](unsigned);
SomeDataType& operator [](const char*);
:
};
Now, the ambiguity occurs here:
void myBigBar()
{
Foo obj;
obj[0].method(); // <= ambiguous call!
}
Anybody has any ideas as to how to resolve this?
Thanks.
Does any of you guys how to solve the following ambiguity?
Consider the following class declaration snippet:
class Foo {
:
public:
SomeDataType& operator [](unsigned);
SomeDataType& operator [](const char*);
:
};
Now, the ambiguity occurs here:
void myBigBar()
{
Foo obj;
obj[0].method(); // <= ambiguous call!
}
Anybody has any ideas as to how to resolve this?
Thanks.