In C++, std::move is not an actual move operation but rather a static cast to an rvalue reference that signals to the compiler that an object is expiring and can be exploited; the actual move occurs in the move constructor, which transfers resources from the source object while leaving it in a valid but unspecified state, similar to how Chihiro in Spirited Away loses her name and identity but remains a valid person who can eventually reclaim her identity.
深掘り
前提条件
- データがありません。
次のステップ
- データがありません。
深掘り
Lightning Talk: std::move & Spirited Away: When Nameless Objects Walk the Spirited World追加:
you are losing a lot of value if you can't make it. There's an enormous return on investment for any company that's paying a developer a reasonable developer wage and sends their developers here. I I I can't tell you how but big of a mistake it is not to send someone to CBPCON.
Good evening everyone. My name is Pu. I also go by Alice. I'm a software engineer working at Evolve Technology.
How does this work? Okay. So tonight, um, welcome to my talk. Uh, I'm going to talk about stood move and spirited away.
I hope this title excites some of you and I expect it will confuse a lot of you. So for those of you who know Spirit Away, I hope you enjoy this talk and for those who don't, good news for you.
You'll walk away from my talk with something you didn't know before. Um so spir so spirited way is this story about this girl who accidentally find herself in this spirited world where um she's enslaved by an evil witch and that evil witch does that by taking away her name and along with her name is taken away uh her memory her connection to her parents. So, it's all about a story of trying to reclaim the name that she lost. And it all begin with her signing a contract.
And there is something very important here. She didn't lose it the moment she write down her name. She just made it available for the evil witch to grab it from her. And does that sound familiar?
Yes. Smooth.
So it confuses when I first see it the first time it confused me so much and I got that question wrong by the lecture but yeah stood move it actually didn't move it's only a static cast to our R value reference and it's a signal to the compiler that this object is expiring you can exploit it you can do nasty things to it and the move actually happens in the video as you can see her hand goes over grabs the name and takes takes it and you can see it by her thumb. This is the move and moving action will be our move constructor. So let's look at it. We create our girl Shahiro. She has her parents. I made the string long enough so that it will be and then um she has happy memories with friends and sad memories of goodbye. And um at line 17 when she signed that contract, she's still safe. It's only when at line 22 that the move constructor starts taking away from her her name, her parents, her memories. That's so bad, [laughter] right? Um and this left her in this still a valid object. She didn't collapse. She walk around. She become a shell of a person, you know, an employee of an empire owned by an evil witch. I hope this doesn't sound familiar to your personal experience.
Um, and um, but yeah, she's in a valid object state, but her identity is yanked away from her. Her sense of self is yanked away from her. And she went from this happy, curious girl to, you see, like unhappy.
And then luckily there is a loophole.
Somehow she got her name back and because it's 5 minutes I'm not going to tell you and you should just go and watch it. And it's a real riddle. You need to watch real hard. Um but there is a loophole. She got her name back. She got her parents back and she went back to the reality world. And somehow in C++ in an obscure corner [laughter] we have something similar. So yeah, it's the same deal at line 16. She's taken but she is in this shell state. She's in this valid but unspecified state. But standard currently requires at least uh that class invariants must still hold [clears throat] so that calling member functions or assigning new values is safe. So don't do this in your code.
This will be so bad. But for the sorry sake, for the story sake, she got her memory back. She even remembers. How cool. That is amazing. That's the best part. You should go and watch it after tonight. And um [laughter and gasps] and then she finds her parents. Here we use assignment operator and it is safe. I I put it in the compiler explorer. Yes.
[laughter] But don't do it in your real code. All right. The most important part. Thank you. I want to thank Aaron, Elanor, Dan, Phil, Michael, and Paulina and Keith for going through the slides with me. to thank all the presenters uh Jason Turner and Danielle Anderson who taught me who taught me stood every error I made on my own and most importantly Daisy and Inbo you are the people that inspired this talk. Uh Inbo actually nudged me last night to come up here. So [laughter] this slide was put together and if you've been to Inbo's talk you know that she make a point to ask for your name when you ask her a question. So you're not a temporary, you're seen. You're known by her and she remembers you. And we deserve to have more leaders like that. We deserve to have female leaders in the field like that. So he won't walk up like that. She won't walk up to Yes.
[applause]
関連おすすめ
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











