可以任何一个解释的区别 [英] can any one explain the difference

查看:79
本文介绍了可以任何一个解释的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

n3035说:(2010-02-16)

n3035 says: (2010-02-16)


一个变量是由对象的声明引入的。变量的
名称表示对象。

A variable is introduced by the declaration of an object. The variable's name denotes the object.

n3090说:(2010-03-29)
$ b

n3090 says: (2010-03-29)


一个变量是通过引用而不是
非静态数据成员或对象的声明引入的。变量的名称表示
引用或对象。

A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object.

n3242说:(2011-02-28)

n3242 says: (2011-02-28)


一个变量是通过引用而不是
非静态数据成员或对象的声明引入的。变量的名称表示
引用或对象。

A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object.

CAN可以解释区别interms一个程序(正是它所说的)

CAN any one explain the difference interms (or) with the help of an program(exactly what it say's)

这是ISO标准C ++语句

this is the statement from ISO standard C++

为什么在最新的C ++ 0x草案中变量的定义改变了?

但是这不是(完整含义)我的问题...

but this is not(full meaning) my question ...

推荐答案

请考虑:

int x = 42;
int& rx = x;

x 应该 rx 也被认为是一个变量?许多标准对非参考变量的要求也适用于参考文献。显然,在整个标准中必须不断地规定变量或对变量的引用是一种痛苦,因此如果变量的定义可以包括引用 - 也许偶尔有除引用,那么标准可以平衡 - 简化。它看起来像我的修订正在探索这种平衡。

x is a variable; should rx also be considered a variable? Many of the Standard's requirements about non-reference variables also apply to references. It's obviously a pain to have to stipulate "variables or references to variables" constantly throughout the Standard, so if the definition of a variable can include references - perhaps with the occasional "except for references", then the Standard may be - on balance - simplified. It looks to me like the revisions were exploring this balance.

这篇关于可以任何一个解释的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆