Files
modern-cpp-tutorial/code/3/3.4.historical.cpp
Changkun Ou 6238d66b11 book: translate ch03
see #12
2019-07-20 12:06:37 +02:00

16 lines
370 B
C++

//
// 3.4.historical.cpp
// modern c++ tutorial
//
// created by changkun at changkun.de
// https://github.com/changkun/modern-cpp-tutorial
//
#include <iostream>
int main() {
// int &a = std::move(1); // illegal, non-const lvalue reference cannot ref rvalue
const int &b = std::move(1); // legal, const lvalue reference can
std::cout << b << std::endl;
}