www.digitalmars.com         C & C++   DMDScript  

c++ - Not allowed: "operator new(size_t size) throw(std::bad_alloc)"?

reply Wu Yongwei <Wu_member pathlink.com> writes:
This, and even

void operator delete(void* pointer) throw()
{
..
}

will cause an error message in DMC:

Error: Exception specifications must match exactly for each declaration of a
function

This is not standard-compliant behaviour.  I need to specify the "throw(...)"
part since other standard-compliant compilers _require_ it.

Could it be fixed?

Best regards,

Yongwei
Dec 18 2004
parent "Walter" <newshound digitalmars.com> writes:
"Wu Yongwei" <Wu_member pathlink.com> wrote in message
news:cq133i$1dua$1 digitaldaemon.com...
 This, and even

 void operator delete(void* pointer) throw()
 {
 ..
 }

 will cause an error message in DMC:

 Error: Exception specifications must match exactly for each declaration of
a
 function

 This is not standard-compliant behaviour.  I need to specify the
"throw(...)"
 part since other standard-compliant compilers _require_ it.

 Could it be fixed?
Yes. I'll add it to the error list.
Dec 27 2004