Skip to content

v.push_back(v[0]) doesn't work, can lead to segmentation fault on resizing #50

@martinus

Description

@martinus

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions