随笔分类 -  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, 阅读全文
posted @ 2011-09-02 17:04 能巴 阅读(1006) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2011-08-26 17:56 能巴 阅读(335) 评论(0) 推荐(0)