C++ Logo


Advanced search

Subject: container constructors for containers
From: Eduard Antonyan (eduard.antonyan_at_[hidden])
Date: 2019-09-06 11:31:15

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.


STD-DISCUSSION list run by herb.sutter at gmail.com

Older Archives on Google Groups