 <p>There is no general and explicit way to constrain vectors. The constraint will have to be enforced as an invariant of your algorithms; whenever you <code>push_back</code> data to one vector, also push it to the other one. (Be sure to keep the vectors <code>private</code>.</p>