Boost logo

Boost :

Subject: Re: [boost] Second iteration of Boost.XInt library uploaded requesting further comments
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-31 14:35:35


AMDG

DE wrote:
> on 31.03.2010 at 22:18
> Steven Watanabe wrote :
>
>> It will not.
>> const size_t bits_per_digit =
>> std::numeric_limits<digit_t>::digits;
>> is equivalent to
>> static const size_t bits_per_digit =
>> std::numeric_limits<digit_t>::digits;
>>
>
> i see
> i'm too lazy too consult the standard
> but still i think it's a good idea to define compile time constants as
> enum members
>
> can you clear this question for me once and forever, Steven? is it
> preferable or is it solely a matter of taste?
>

static const size_t is usually better because it has the
correct type, and so will behave better for overload
resolution.

In Christ,
Steven Watanabe


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