Kerrek SB explained the situation well, but to do what you want to do differently, you can also std::generate_n algorithm:
std::vector<std::shared_ptr<Node>> nodes; std::generate_n( std::back_inserter(nodes), 5, std::make_shared<Node>);
It is more like what you thought you were doing initially.
Or similarly:
std::vector<std::shared_ptr<Node>> nodes(5); std::generate(nodes.begin(), nodes.end(), std::make_shared<Node>);
Barry source share