[英]C++ — What is the meaning of this statement?
I saw the following class definition and cannot figure out the meaning of the line 1. 我看到了以下类定义,但无法弄清第1行的含义。
class Noisy {
public:
Noisy() throw();
~Noisy() throw();
Noisy& operator= (const Noisy&) throw();
Noisy (const Noisy&) throw(); // Line 1
};
What is the meaning of this line and what is the usage of this line? 该行的含义是什么,该行的用途是什么?
Thank you 谢谢
It isn't a statement. 这不是声明。 It is a declaration of a copy constructor that is specified as throwing no exceptions.
它是复制构造函数的声明,被指定为不引发异常。
You can find out more in your favorite good introductory C++ book . 您可以在您最喜欢的优秀C ++入门书中找到更多信息。
Look at this thread. 看这个线程。 It will give you some more insight.
它将为您提供更多的见解。 Should I use an exception specifier in C++?
我应该在C ++中使用异常说明符吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.