Skip to content

Error when copy constructor is deleted #5

@Muppetsg2

Description

@Muppetsg2

I encountered a compilation error when using mstd::stable_vector with a type that has both its copy constructor and copy assignment operator deleted.

The error pointed to stable_vector.hpp (around line 101). The issue appears to be caused by missing perfect forwarding, which results in an attempt to use a deleted copy operation.

I was able to fix it by changing the line to:

return _data.insert(_data.cend(), std::forward<T>(value));

This ensures proper forwarding and allows move-only types to work correctly.

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