public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63753] New: std::transform does not change size
@ 2014-11-05 18:29 darkdragon-001 at web dot de
2014-11-05 22:15 ` [Bug libstdc++/63753] " glisse at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: darkdragon-001 at web dot de @ 2014-11-05 18:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63753
Bug ID: 63753
Summary: std::transform does not change size
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: darkdragon-001 at web dot de
When using std::transform with a OutputIterator to std::vector then the vector
size is not updated (see code attached):
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<double> v = {1,2,3,4,5};
vector<double> r;
r.reserve(v.size());
transform(v.begin(),v.end(),r.begin(),[](const double& d) {
return 2*d;
});
cout << "size:" << r.size() << "front:" << r.front() << endl;
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/63753] std::transform does not change size
2014-11-05 18:29 [Bug c++/63753] New: std::transform does not change size darkdragon-001 at web dot de
@ 2014-11-05 22:15 ` glisse at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-11-05 22:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63753
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
It isn't supposed to be updated.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-05 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05 18:29 [Bug c++/63753] New: std::transform does not change size darkdragon-001 at web dot de
2014-11-05 22:15 ` [Bug libstdc++/63753] " glisse at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).