From the course: Modern C++: Advanced Techniques and Features
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Additional considerations - C++ Tutorial
From the course: Modern C++: Advanced Techniques and Features
Additional considerations
- In this section, we're going to take a look at some additional considerations concerning lvalues and rvalues. In particular, we're going to talk about what is this mysterious xvalue all about. Xvalue is an expiring lvalue, weird concept. So I'll explain what that means. We'll also discuss why that's an important concept and then we'll see about how to actually, how to create an xvalue and why that's useful. At the end of the section, we're also going to talk about something unrelated topic really, but something that's really important. There's a term called a universal reference. It's to do with templates. We'll see what it means and why it's useful. It's a very clever mechanism. Okay, so first of all, got this picture here. This is a reminder of the picture that we had earlier talking about the different value categories that we have in modern C++. So on the left-hand side, we've got the general concept of an lvalue. A glvalue is a generalized lvalue. Basically a glvalue is a…