David Chandler
2011-03-18 18:35:20 UTC
In IDL I have defined the following value
const string INVALID = "INVALID";
which compiles to the following C++ code:
const CORBA::Char* INVALID = "INVALID";
and the following function
string foo();
which compiles to the following C++ code:
CORBA::Char* foo();
In the impl, I'd like, under certain circumstances to allow foo() to
return INVALID. This results in compiler warnings about const and non-
const types. However, the IDL compiler chokes on
const string foo();
which is what I'd really like to do (something that compiles into
const CORBA::Char* foo() )
What's the proper way to handle this?
const string INVALID = "INVALID";
which compiles to the following C++ code:
const CORBA::Char* INVALID = "INVALID";
and the following function
string foo();
which compiles to the following C++ code:
CORBA::Char* foo();
In the impl, I'd like, under certain circumstances to allow foo() to
return INVALID. This results in compiler warnings about const and non-
const types. However, the IDL compiler chokes on
const string foo();
which is what I'd really like to do (something that compiles into
const CORBA::Char* foo() )
What's the proper way to handle this?