[EISA] const correctness in EISA
James Hill
hillj at isis.vanderbilt.edu
Wed Dec 3 14:35:40 CST 2008
Hey Will,
> -----Original Message-----
> From: eisa-bounces at list.isis.vanderbilt.edu
> [mailto:eisa-bounces at list.isis.vanderbilt.edu] On Behalf Of
> William R. Otte
> Sent: Wednesday, December 03, 2008 2:15 PM
> To: eisa at list.isis.vanderbilt.edu
> Subject: [EISA] const correctness in EISA
>
> Hi folks -
>
> I am looking through the EISA code, and I had a question....
> there are several instances similar to the following where
> the intent of the const is essentially meaningless:
>
> EISA_EINode_i * const einode ();
>
> which means the method returns a const pointer to a mutable
> object, which in this case the const pointer in question is a
> temporary and ignored by some compilers.
>
> Is the intent to make the return value pointer to a constant
> object, ie:
> const EISA_EINode_i * einode ();
>
> or the method:
> EISA_EINode_i * einode () const;
>
> or is it exactly as intended?
My understanding of that was incorrect then. We need to remove the
'const' modifier b/c you don't want it to go at the end of the method.
Thanks,
James
>
> thanks,
> /-Will
>
More information about the EISA
mailing list