move-semantics
Move ctor dilemma
In order to disable copying of my class I\'m suppose to declare as private but not define operator=(const MyClass&) and MyClass(const MyClass&) - do I have to also disable move ctor for this c[详细]
2023-01-26 06:02 分类:问答Does D have something akin to C++0x's move semantics?
A problem of \"value types\" with external resources (开发者_Python百科like std::vector<T> or std::string) is that copying them tends to be quite expensive, and copies are created implicitly in[详细]
2023-01-25 05:16 分类:问答How to handle missing 'emplace_range' in C++0x STL?
I have two containers, let\'s say they\'re defined like this: std::vector<std::unique_ptr<int>> a;[详细]
2023-01-24 23:49 分类:问答Splitting range into sub-ranges
I have a container std::vector and I would like to efficiently split it into sub-ranges with x items in each. The original container is not needed so the items should be moved and not copied into the[详细]
2023-01-24 12:03 分类:问答Am I the only one who finds std::move a little too difficult to understand?
So I have been reading about std::move, std::forward, rvalues, lvalues ad so on in SO and other places. But I find that I can\'t grasp it. Even though I sometimes get into fixes, I think I understand[详细]
2023-01-24 11:45 分类:问答Calling base class move ctor [C++0x]
Which is the right way to call base class move ctor? thi开发者_运维百科s (works in MSVC2010, but not in CBuilder2010):[详细]
2023-01-22 16:40 分类:问答Move constructor for a map
I think I do understand \"the basic IDEA\" of move semantics, but now when I\'m on the stage of implementing my own map I stopped 开发者_运维问答and started to think about it when I was going to write[详细]
2023-01-22 01:10 分类:问答Is it bad form to provide only a move constructor?
I would like to return a noncopyable object of type Foo from a function. This is basically a helper object which the caller will use to perform a set of actions, with a destructor to perform some clea[详细]
2023-01-14 20:38 分类:问答What is std::move(), and when should it be used?
What is it? Wh开发者_JAVA技巧at does it do? When should it be used? Good links are appreciated.1. "What is it?"[详细]
2023-01-10 13:45 分类:问答Moving ctor and moving dtor
As I\'ve asked in Move constructor/operator= and after a while I\'ve agreed and accepted right answer to that question I was just thinking, if would it be useful to have something like \"moving destru[详细]
2023-01-09 21:22 分类:问答