opMul

Dave Dave_member at pathlink.com
Sat Mar 8 18:02:36 PST 2008


"Dave" <Dave_member at pathlink.com> wrote in message 
news:fqv8qj$1ol3$1 at digitalmars.com...
>
> I think either const(this) or T const f() are prefereable to trailing 
> const.
>

OTOH, "T f() const" is not only familiar to C++ programmers but it is now 
consistent with another function modifier, 'nothrow'. And since it would 
then allow for:

const T function_without_this(){}

it would be yet more consistent with how const is used elsewhere with types.

Walter, is this why you added trailing const?

- Dave




More information about the Digitalmars-d mailing list