Philippe A. Bouchard wrote:

[...]

> It's true.  Imagine we have some partial specialization of array<bool,
> size_t>:
>
> template <unsigned int I>
>     struct array<bool, I>
>     {
>         char value_[I >> 3];
>
>         // Read-only version:
>         bool operator [] (unsigned int a_index) const
>         {
>             return value_[a_index >> 3] & (1u << (a_index % 8));
>         }
>     };

Please excuse me for writing to way, I am taking for granted a char is 8
bits long.  I do not wish to bypass any portability rules...



Philippe A. Bouchard




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

Reply via email to