Boost logo

Boost Users :

Subject: Re: [Boost-users] General C++: Class Method Signatures Miss-Match
From: tom fogal (tfogal_at_[hidden])
Date: 2009-05-01 22:15:50


Dominique Devienne <ddevienne_at_[hidden]> writes:
> On Fri, May 1, 2009 at 10:32 AM, Dan Day <coolmandan_at_[hidden]> wrote:
> > I thought that int represented the natural word size of the
> > architecture. If so, then wouldn't unsigned int be 64-bit on a
> > 64-bit platform as well?

I had heard this before as well. I took a quick look through c1x-1336
(current (?) draft of C) though, and I could not find anything to this
effect.

Of course, that doesn't say it's not there, and I did not check the C++
standard.

> The few 64-bit platforms I've seen keep [unsigned] int at
> 32-bits. --DD

To be pedantic, this depends on the system's data model.

  http://en.wikipedia.org/wiki/64-bit#64-bit_data_models
  http://www.unix.org/version2/whatsnew/lp64_wp.html

The first link does make some effort into listing which systems follow
which models. Indeed, as Dominique says, most recent systems (e.g.
Linux, Mac, and Windows on amd64) have chosen models which have kept
int at 32bit.

-tom


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