Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » IType question
IType question [message #911924] Wed, 12 September 2012 11:43
Raymond Mising name is currently offline Raymond Mising name
Messages: 59
Registered: July 2009
Member
I have a method defined like below:
void myMethod( const Object* const myobj);

In CDT, the type of the parameter was resolved as a CPPPointerType which contains a type of CPPQualiferType which contains a type of PDOMCPPClassType. This looked correct. However, the isConst of the CPPointerType was false. From my understanding, in this case the it should be true, isn't it? The isConst of the CPPQualiferType was true which was correct. I also tested if my method was defined like below:
void myMethod( const Object* myobj);
The type of the parameter was resolved as the same as above. So, basically, it did not tell if a pointer is a const pointer. Is this expected?

Also, I have method defined like below:
void myMethod2( const Object);
the type of the parameter was resolved as a PDOMCPPClassType. So that I can not tell if the parameter is a const or not. Is this expected?

Thanks.
Previous Topic:Rename the Open Declaration
Next Topic:opening .H/.C/.CPP popps-up notepad
Goto Forum:
  


Current Time: Wed Aug 27 17:14:40 EDT 2014

Powered by FUDForum. Page generated in 0.02014 seconds