Suppose I have two unrelated classes A
and B
. I also have a class Bla
that uses boost::shared_ptr
like t
The following compiles fine with GCC 4.5 and Visual Studio 10. If you say it doesn't compile in GCC 4.5.2 then it sounds like a compiler bug which you should report (but make sure that it really happens it's more likely that you made some sort of typo).
#include
class A{};
class B{};
class Bla {
public:
void foo(std::shared_ptr) {}
void foo(std::shared_ptr) {}
};
int main()
{
Bla bla;
std::shared_ptr a;
bla.foo(a);
}