Boost logo

Boost Users :

Subject: [Boost-users] [integer] what is the fastest integer type which can hold an 8 bit number?
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-09-11 00:30:42


Reading the documentation at

http://www.boost.org/doc/libs/1_59_0/libs/integer/doc/html/boost_integer/integer.html

I invoke the following

using temp_integer = typename boost::int_t<8>::fast;

With the idea of getting the fastest integer type which will hold an 8
bit signed number.

But I get temp_integer equal to a char type. This surprises me. I
don't believe that the fastest integer type which can hold an 8 bit
signed integer is a char. I looked into the boost/integer.hpp and I
can't really figure it out. It doesn't seem to to have any processor
specific code in it - which I would think would be necessary to
implement the function. What am I missing here?

Robert Ramey


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