随笔分类 - C++11
摘要:1. 什么是rValue?lValue呢?rValue主要是指没有名字的变量(即临时变量/对象);lValue主要是指有名字的变量。除了lValue都是rValue(废话)。下面的例子可以比较直观的帮助理解:int&& n = 42; // OK; 42 is an rvalue; n is rvalue reference.int k = n; // OK; n is rValue reference and is lValue.int&& j = k; // Error; k is an lvalueint&& m = k+1; // OK,
阅读全文
摘要:rValue reference:http://thbecker.net/articles/rvalue_references/section_01.htmlBelow is the full article from here:The Biggest Changes in C++11 (and Why You Should Care) It’s been 13 years since the first iteration of the C++ language. Danny Kalev, a former member of the C++ standards committee...
阅读全文

浙公网安备 33010602011771号