Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-14 09:21:07


Scott Schurr <scott_schurr_at_[hidden]> writes:

>> * How does it deal with bit values like 0111? This is octal value.
>
> Right. There are specilizations for decimal and octal values.
> This means there is some aliasing. A few non-binary decimal and
> octal values leak through. For example 0111 (octal) is 73 decimal
> and, for that matter, 0x49 hex. So the template accepts all of
> these values. It's not perfect, but it's the best I could figure
> out.
>

I think the answer is confusing. I don't know what "aliasing" means
in this case, but: aside from zero, the decimal numerals containing
all 1s and 0s have distinct values from the octal numerals containing
all 1s and 0s, at least up to something like 16 bits. There's no
ambiguity.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk