The C++11 standard gives an opportunity to initialize a vector with an initialization list like this.
vector a {3, 5, 6, 2};
I am
You need to define a constructor for Foo that takes an initializer list, and pass it to the vector.
See http://en.cppreference.com/w/cpp/utility/initializer_list for an example that does exactly what you need