[英]expected type-specifier before '…' token
expected type-specifier before '...' token
这是代码
template< typename T, int t_nFixedBytes = 128, class Allocator = CCRTAllocator >
class CTempBuffer
{
public:
CTempBuffer() throw() :
m_p( NULL )
{
}
CTempBuffer( size_t nElements ) throw( ... ) : <---ERROR HERE
m_p( NULL )
{
Allocate( nElements );
}
...
}
现在如果我摆脱了上面的声明中的throw(...),这个错误就解决了。关于Mingw为什么不喜欢throw(...)
?
实际上, throw(...)
不是标准的c ++语法,而是特定于MSVC ++的扩展。 这仅表示此函数可以引发任何异常,这等效于根本没有异常规范,因此您可以安全地删除它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.