How to declare a const const-pointer? [message #1808928] |
Thu, 04 July 2019 16:11 |
Martin Friedrich Messages: 10 Registered: November 2015 |
Junior Member |
|
|
Hi all,
I just stumbled over the (admittedly somewhat academic) topic of how does one declare a const pointer to a (non-)const type for C/C++, i.e. something like
(Again, note that here the pointer is const, but not the data pointed to.) When generating code, I always end up with
regardless of the order of the <Ptr>- and <Const>-stereotypes applied.
Regards,
Martin Friedrich
[Updated on: Thu, 04 July 2019 16:13] Report message to a moderator
|
|
|
Re: How to declare a const const-pointer? [message #1808937 is a reply to message #1808928] |
Thu, 04 July 2019 17:26 |
|
Dear Martin,
the code generator does not properly support this case - it does not take the order of the stereotype application into account. If you think that this is an important limitation, please post a bug.
A (quite ugly) is not to apply the <Const> stereotype and use the "declaration" attribute of the <Ptr> stereotype, i.e. assign the string "const*".
Ansgar
|
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds