exception specifications legal in C++/CLI

B

Brian

I'm trying to comile some managed C++ code in VC++ 2005 beta that has a lot
of exception specifications,ie

int func() throw( SomeException*) ;

I'm getting these messages:

error C2353: exception specification is not allowed.

unfortunately MSDN isn't much help here. Obviously, C++/CLI is not allowing
exception specifications. Is there a flag to ignore the specifications?
 
W

William DePalo [MVP VC++]

Brian said:
I'm trying to comile some managed C++ code in VC++ 2005 beta that has a
lot
of exception specifications,ie

int func() throw( SomeException*) ;

I'm getting these messages:

error C2353: exception specification is not allowed.

unfortunately MSDN isn't much help here. Obviously, C++/CLI is not
allowing
exception specifications. Is there a flag to ignore the specifications?

Yeah, the error message is new so it doesn't appear in the "released"
version of the MSDN library. But at this link

http://msdn2.microsoft.com/library/7tfey5a9(en-us,vs.80).aspx

<quote>
Compiler Error C2353
exception specification is not allowed

Exception specifications are not allowed on member functions of managed
classes.

The following sample generates C2353:
</quote>

With no mention of override, I would _assume_ that it is an example of "you
can't get there from here".

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top