От: | rain.drop | ||
Дата: | 18.11.18 18:41 | ||
Оценка: | 6 (1) |
void func(int&&) noexcept {
}
int main() {
int x = 10;
func(x); // error: cannot bind 'int' lvalue to 'int&&'
}
// template< class T >
// typename std::remove_reference<T>::type&& move( T&& t ) noexcept;
int main() {
int x = 10;
std::move(x); // OK
}