29 Oct
2004
29 Oct
'04
5:28 p.m.
Foster, Gareth wrote:
This randomly made me wonder ...
if(const int * == int const *)
Is that just a personal preference thing?
Yes, in fact the only reason for allowing const int as an alias for int const is because people prefer it that way. However the regular syntax has some advantages. For example, people that are used to 'const int *' sometimes expect const PtrInt, where PtrInt is a typedef to int *, to produce the same result. It doesn't; it yields int * const.