Boost logo

Boost Users :

Subject: Re: [Boost-users] max value by the number of bits
From: TONGARI (tongari95_at_[hidden])
Date: 2013-02-05 11:01:56


2013/2/5 Christian Henning <chhenning_at_[hidden]>

> >> Mhmm, I don't see how that works. How do I get the max value from a
> >> low_bit_mask_t? It should be 2^n-1 with n being the number the bits.
> >
> >
> > low_bits_mask_t<n>::sig_bits
> >
> > Not?
>
> Yes. Thanks! It works but not for n = 64. It gives a wrong value:
>
> typedef boost::low_bits_mask_t<64> mask_t;
> mask_t::least oo = mask_t::sig_bits;
>
> Does that work for you?
>

Yes, I got 18446744073709551615

http://liveworkspace.org/code/3xi9dD$0



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