Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ and copying

Name: Anonymous 2013-06-13 5:34

Why the fuck does everything in C++ insist on endlessly copying shit here and there, spawning 4 (FOUR!!!) copies of some fucking object during certain calls to methods of stdlib containers (vector, tuple etc).

I can't create a fucking thread without it copying my ``functor'' object (with operator()) at least twice for some fucking reason.

So yeah, if you want fast C++ programs, you fucking write them in C, with manual handling of pointers and shit.  Fuck C++.

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-06-13 6:17

Because the language can't make any assumptions about what your objects contain, it must use the construct/assign/destruct sequence. The standard library containers are very generic and while your case might not require the copying, it might not work in all cases. If you want a non-copying vector, you write it yourself. C++11 has some features that could help.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List