
13 Apr
2007
13 Apr
'07
8:14 p.m.
On Fri, 13 Apr 2007 14:11:49 +0200, Maurizio Vitale <mav@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. Marco -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/