Boost logo

Boost :

From: Marco (mrcekets_at_[hidden])
Date: 2007-04-13 16:14:06

On Fri, 13 Apr 2007 14:11:49 +0200, Maurizio Vitale
<mav_at_cuma.polymath-solutions.lan> wrote:

> This is a short example that I put together to show how to use
> boost::proto for
> modifying the semantics of C++ builtin datatypes.
> In particolar we define unsigned integers for which we can define a width
> (less than sizof(unsigned int)*8). Values are masked and bits outside the
> declared width are discarded. We also redefine the shift operator so that
> both positive and negative shift counts are supported.

Really nice ! You used boost::proto to make up integers modulo N with N a
power of 2.


Using Opera's revolutionary e-mail client:

Boost list run by bdawes at, gregod at, cpdaniel at, john at