C++ Logo


Advanced search

container constructors for containers

From: Eduard Antonyan <eduard.antonyan_at_[hidden]>
Date: Fri, 6 Sep 2019 11:31:15 -0500
Every single time I've used the InputIterator constructors of various
containers (e.g. vector or set), it's been to convert an existing container
from one type to another (e.g. set to a vector). As such my code could've
been simpler and more concise if the constructors simply took a container
as an argument and did the begin/end internally.

Any reasons to not have such constructors? These are trivial to write and
I'm happy to provide the code, but perhaps I'm missing something.


Received on 2019-09-06 11:33:34