扔操作员 [英] throw operator

查看:80
本文介绍了扔操作员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么将throw关键字视为运算符?

Why is throw keyword considered as an operator?

推荐答案

Ranganath写道:
Ranganath wrote:

为什么将throw关键字视为运算符?
Why is throw keyword considered as an operator?



根据错误的前提回答问题是不可能的。

''throw''不是运营商。为什么你认为它是一个?或者,

而不是,你是什么意思被视为一个运营商?什么是

上下文?


V

-

请删除资金''A当用电子邮件回复时

我没有回复最热门的回复,请不要问

It is impossible to answer a question based on a wrong premise.
''throw'' is not an operator. Why do you think it is one? Or,
rather, what do you mean "considered as an operator"? What is
the context?

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


2007 -10-03 12:31,Ranganath写道:
On 2007-10-03 12:31, Ranganath wrote:

为什么将throw关键字视为运算符?
Why is throw keyword considered as an operator?



出于同样的原因,new,delete和sizeof是运算符,我会怀疑是b
。如果它不是运营商,它还会是什么呢?


-

Erik Wikstr ?? m

For the same reason that new, delete, and sizeof are operators I would
suspect. What else would it be, if it was not an operator?

--
Erik Wikstr??m


Erik Wikstr?m写道:
Erik Wikstr?m wrote:

2007-10-03 12:31,Ranganath写道:
On 2007-10-03 12:31, Ranganath wrote:

>为什么将throw关键字视为运算符?
>Why is throw keyword considered as an operator?



出于同样的原因,new,delete和sizeof都是运算符,我会怀疑是b
。如果它不是运营商,它还会是什么?


For the same reason that new, delete, and sizeof are operators I would
suspect. What else would it be, if it was not an operator?



什么''返回''? ''throw''就是这样。


''删除''是一个操作符,因为你被允许超载它和

因为这个名字该函数将是''operator delete''。但是其他真正的运算符中的
它很突出,因为它不会产生一个值,因此不能用于另一个表达式。


''throw''是两个构造中使用的关键字:声明列表

函数可以抛出并实际重定向

流。 ''return''不是用来声明任何东西,也不是''goto''。

但''throw''更像是''return''或''goto' '比''sizeof''或

''typeid''。


V

-

请在通过电子邮件回复时删除资金''A'

我没有回复最热门的回复,请不要问

What''s ''return''? ''throw'' is exactly that.

''delete'' is an operator because you''re allowed to overload it and
because the name of that function would be ''operator delete''. But
among the rest of true operators it stands out because it does not
yield a value and hence cannot be used in another expression.

''throw'' is a keyword used in two constructs: to declare the list
of exceptions the function can throw and to actually redirect the
flow. ''return'' isn''t used to declare anything, neither is ''goto''.
But ''throw'' is much more like ''return'' or ''goto'' than ''sizeof'' or
''typeid''.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


这篇关于扔操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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