Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » IType question
IType question [message #911924] Wed, 12 September 2012 11:43
Eclipse UserFriend
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: Mon Jun 16 06:09:51 EDT 2025

Powered by FUDForum. Page generated in 0.07031 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top