expected type-specifier before '...' token
This is the code
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 );
}
...
}
Now if i get rid of the throw(...) in the above statement this error is resolved.Any suggestions on why Mingw doesnt like throw(...)
here ?
Actually, throw(...)
is not standard c++ syntax, but a MSVC++ specific extension. It just means that this function can throw any exception, which is equivalent to having no exception specification at all, so you can safely remove it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.