The container std::vector<bool>
is a special type of std::vector
that has "optimized" storage. I'm trying to cast from vector<bool>
to vector<double>
but the following does not work, contrary to vector<int>
to vector<double>
vector<double> vf(vi.begin(), vi.end());
Is there a quick way to accomplish this without explicitly looping (std::transform
included)?
Aucun commentaire:
Enregistrer un commentaire