make_shared allocates a new shared region from the pointer you pass in, i believe.
No. std::make_shared passes whatever arguments it receives to the underlying class's constructor. The difference between(1) someSharedPointer = std::shared_ptr<MyType>(new MyType(A, B, C, ...)); (2) someSharedPointer = std::make_shared<MyType>(A, B, C, ...);is soley the fact, that there are two allocations done in (1) and only a single allocation in (2). If jdub intends to copy construct a new Renderer/InputController/Timer instance in a new shared pointer, what he does is completely correct.
jdub: the key problem is that the error messages you posted are incomplete. Unfortunately the MSVC Error List omits a lot important information. The Output is much more descriptive, including information what types the templates have in the problematic areas. You are also not saying in which lines the errors are happening.
You're right, it uses variadic templates to forward arguments to the std::shared_ptr constructor, and the allocation (whether it's one or two allocs) happens inside the ctor.
So what happens when you have a shared_ptr<T> p, and pass a *p to a make_shared? *p returns a reference, so make_shared passes that reference to the shared_ptr ctor, but there is no ctor that accepts a T&, so wouldn't that be an error too? Or is something else happening that i'm not aware of?
Also, if you have a shared_ptr<T> p, and pass it in a function with p.get(), and that function passes the pointer to make_shared, does that mean two separate reference counts will monitor the same pointer? And deleting both shared pointers would cause either a crash or undefined behaviour?