Another way would be to return a std::pair<bool, std::vector<int>> ... http://en.cppreference.com/w/cpp/utility/pair
... but in my opinion it makes the code calling the function less nice because you can't name the bool and the vector individually.
Breaking it into 2 function is rather a waste of overhead in many cases IMO...
How is combining values xxx and yyy possible ?
I only know how to do that with string but that is also a strange thing to do because why separate them in the first place when It can combined...