Quick Q: Inserting a variadic argument list into a vector? -- StackOverflow
I have an object that needs to take a variadic argument list in its constructor and store the arguments in a
vector
. How do I initialize avector
from a the arguments of a variadic constructor?class GenericNode { public: GenericNode(GenericNode*... inputs) { /* Something like... */ // inputs_.push_back(inputs)...; } private: std::vector<GenericNode*> inputs_; };