|
Boost Users : |
Subject: Re: [Boost-users] How to find: best integer type for processor
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-10-30 13:15:51
On Thu, Oct 30, 2008 at 13:08, Othman, Ossama <ossama.othman_at_[hidden]> wrote:
>>If you want the largest native integer, though not 100% portable to
>>weird archs, this should work in x86/x64 and most others:
>>
>>typedef boost::int_t<sizeof(void*) * 8>::fast fastint_t;
>
> Why not just use the standard {u}intptr_t or {u}intmax_t typedef in this case?
>
For intptr_t, this message comes to mind:
http://lists.boost.org/Archives/boost/2005/09/94158.php
And intmax_t is the wrong choice on 32-bit systems that provide a 64-bit type.
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