ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] integer_mask for long long
by Daryle Walker other posts by this author
Sep 29 2005 12:08PM messages near this date
[boost] [typeof] can't find test results | [boost] Note for those making bounded types (was: Re: integer_mask for long long)
SOURCE On 9/22/05 10:36 AM, "Aschwin Gopalan" <gopalan@[...].de>  wrote:

>  I am trying to do a small template based fixed-point arithmetic library
>  and I am using integer_mask.hpp to extract some bit-masks I need.
>  Everything works as expected as long as my fixed-point numbers are not
>  larger than 32bit. I am on Intel hardware using gcc and there is long
>  long, wich is 64bit. I would like to be able to use it together with my
>  fixed point template, but integer_mask.hpp works only up to long. Is
>  there a compelling reason for this?

Maybe.

"integer_mask.hpp" doesn't use any extended integer types because
"integer.hpp" didn't either.

"integer.hpp" doesn't use any extended integer types because:
1.  Their existence in compilers back then (2001) were more rare.
2.  There were concerns back then that the extended types could not
    be used in value-based template parameters.  That's important since
    Boost.CRC does that type of usage.  I don't know how accurate that
    concern was then or is now.

Possible solutions:
A.  Determine the largest integer type that can be used as a template
    parameter, and make new typedef-s if the result ever differs from
    (u)intmax_t on some platform.  (Or we can always define the typedef
    to make it always available.)  Make sure Boost.CRC uses the
    appropriate typedef.
B.  Change Boost.CRC to always use "unsigned long" for its value-based
    template parameters (or the typedef given in [A]).

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved