[omniORB] Const correctness for exceptions
Serguei Kolos
Serguei.Kolos at cern.ch
Fri Feb 18 09:38:51 GMT 2005
I have noticed that in the omniORB 4.0.5 the 'const' qualifier
disappeared from the
signature of the CORBA::Exception::_duplicate function. Before it was
declared as
CORBA::Exception::_duplicate(const Exception* e)
now
CORBA::Exception::_duplicate(Exception* e)
Is there any reason for that change? I understand that this function is
not defined
in the CORBA standard, but I have found it very useful for copying
exceptions
in generic way. But in this case the constantness of the copied
exception is not
preserved any more. The following code does not compile:
store_exception( const CORBA::SystemException & ex )
{
CORBA::SystemException * pex = CORBA::SystemException::_downcast(
CORBA::Exception::_duplicate( &ex ) );
}
Is it possible to put back the old signature for the _duplicate function?
Cheers,
Sergei
More information about the omniORB-list
mailing list