StackOverflow Questions for Tag: move-semantics

J.N.
J.N.

Reputation: 8431

c++ type trait to say "trivially movable" - examples of

Score: 8

Views: 2194

Answers: 2

Read More
Max Cury
Max Cury

Reputation: 55

How to use move semantics in a loop and avoid copying?

Score: -1

Views: 193

Answers: 2

Read More
vsoftco
vsoftco

Reputation: 56577

Why should I delete move constructor and move assignment operator in a singleton?

Score: 33

Views: 34652

Answers: 2

Read More
shivakumar
shivakumar

Reputation: 3407

If Move semantics(Move constructor and Move assignment operator) are not defined does compiler optimize by default?

Score: 0

Views: 184

Answers: 1

Read More
Lingxi
Lingxi

Reputation: 14987

Most concise way to disable copy and move semantics

Score: 27

Views: 13698

Answers: 6

Read More
ronag
ronag

Reputation: 51273

push_back vs emplace_back

Score: 1218

Views: 757243

Answers: 8

Read More
Adam Barnes
Adam Barnes

Reputation: 3233

How can I use `.value()` on `std::expected<T, E>` where `T` is a move-only type?

Score: 4

Views: 87

Answers: 1

Read More
Mike Weller
Mike Weller

Reputation: 45598

Can the compiler implicitly std::move arguments when referenced just once?

Score: 6

Views: 568

Answers: 2

Read More
AhSeng Fan
AhSeng Fan

Reputation: 467

Does assigning make_unique require std::move() to an empty unique_ptr?

Score: 13

Views: 7162

Answers: 3

Read More
PiRK
PiRK

Reputation: 1075

How not to capture or move a String in a match branch or ok_or argument

Score: 1

Views: 78

Answers: 3

Read More
Swift - Friday Pie
Swift - Friday Pie

Reputation: 14688

Is using QString after being `std::move`d defined?

Score: 1

Views: 945

Answers: 1

Read More
alfC
alfC

Reputation: 16300

Is std::move(*this) a good pattern?

Score: 41

Views: 7763

Answers: 2

Read More
Blindy
Blindy

Reputation: 67447

Confused about returning std::unique_ptr

Score: 2

Views: 137

Answers: 1

Read More
Fureeish
Fureeish

Reputation: 13434

Is there a reason for the lack of vector's (and other sequential containers such as deque) constructor that moves an element to perfom one less copy?

Score: 2

Views: 97

Answers: 0

Read More
glades
glades

Reputation: 4848

Why does moving a const ref return value into another function still move-construct the object?

Score: 2

Views: 79

Answers: 1

Read More
dwto
dwto

Reputation: 805

Implementing bitwise swap for MyString

Score: 3

Views: 133

Answers: 2

Read More
Sprotte
Sprotte

Reputation: 191

Understanding why the move constructor is called in addition to the move assignment operator in Stroustrup's PPP?

Score: 3

Views: 78

Answers: 1

Read More
aafulei
aafulei

Reputation: 2245

Move constructor called twice when move-constructing a std::function from a lambda that has by-value captures

Score: 22

Views: 2363

Answers: 2

Read More
WiSaGaN
WiSaGaN

Reputation: 48137

Can Rust optimise away the bit-wise copy during move of an object someday?

Score: 30

Views: 4447

Answers: 2

Read More
Basilevs
Basilevs

Reputation: 23929

What is std::move(), and when should it be used?

Score: 1185

Views: 634084

Answers: 10

Read More
PreviousPage 1Next