C++ Logo


Advanced search

Subject: std::valarray<T>::resize
From: Vladimir Grigoriev (vlad.moscow_at_[hidden])
Date: 2019-10-11 06:42:23

The effect of the member function resize of the class std::valarray looks very strange compared with the same member function for example of the class std::vector. Why are all elements are set to T() (or to the specified value) instead of the elements that are appended to an object of the type std::valarray? This only confuses users of the class.

With best regards,
Vlad from Moscow

You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups