Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-10-29 12:28:16


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net