What is the proper way to up-cast a child shared pointer to its parent shared pointer? The commented section where I'm going from an apple to a fruit, is where I'm unclear.
class Fruit
{
};
class Apple : public Fruit
{
};
typedef std::shared_ptr<Fruit> FruitPtr;
typedef std::shared_ptr<Apple> ApplePtr;
int main()
{
ApplePtr pApple = ApplePtr( new Apple() );
FruitPtr pFruit = /* what is the proper cast using c++ 14 */
}