So far, I had a function that received a type argument IArg, and I could do the following:
struct IArg
{
};
struct Arg : IArg
{
};
void f (IArg* arg)
{
}
f(new Arg);
Now that I got this:
void f (std::shared_ptr<IArg> arg)
{
}
Why is he working with again
f(std::make_shared<Arg>());
std::shared_ptr<A>and std::shared_ptr<B>are different types, even if A, and Brelated, right?
Narek source
share