Opened 3 years ago

Closed 3 years ago

#11867 closed Feature Requests (fixed)

small_vector should have constructor and assignment operator taking other small_vector

Reported by: Sebastian Redl Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:


small_vector<T, N> should be constructible and assignable from small_vector<T, M>. There's really no good reason not to have these functions.

Change History (2)

comment:1 Changed 3 years ago by Ion Gaztañaga

Maybe not from small_vector<T, M> but from small_vector_base, which might be more flexible.

LLVM's SmallVector?, which is the inspiration for small_vector, supports only move construction and assignment from SmallVectorImpl?, I can't figure out why copy construction is not supported:

Thanks for the report.

comment:2 Changed 3 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Added support for constructors and assignments from small_vector_base in commit:

Note: See TracTickets for help on using tickets.