【发布时间】:2011-11-11 21:04:15
【问题描述】:
在 C++0x -n3290 Draft 中:他们在部分添加:Destructors : 12.4/2nd point last line
**A destructor shall not be declared with a ref-qualifier.**
在 c++03 Draft .... 他们没有在析构函数中提到这一点?
我的问题是
*~S() ; //this declaration is allowed or not according to the Standard's
//**~S(); ***~S() ; etc...........
允许这种类型的声明吗? 没有他在草案中的什么地方描述过这个……宣言?
在 GCC 4.6.0,Sun/Oracle C++12.0 中, --->这个声明是允许的 int Comeau C/C++ -->不允许
【问题讨论】:
标签: c++ destructor declaration c++11