**Describe the bug** or `v.assign(1000, v[0])`. This should work, it does so per the standard for std::vector, even when it needs to resize. See https://stackoverflow.com/a/18788810/48181