[C++-sig] Re: indexing_v2 status update

Raoul Gough RaoulGough at yahoo.co.uk
Sat Jan 24 13:24:37 CET 2004


"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 23 Jan 2004 at 10:49, Raoul Gough wrote:
>
>> 2. What is the likelihood that we would ever need more than 32 (there
>>    are currently 16)?
>> 
>> What I'm thinking is, can we go with the simplest approach that works
>> now, and switch to a more complex solution if it ever becomes
>> necessary? Of course, it would be helpful to know what the above code
>> would look like with a vector_c type solution.
>
> Surely you can use long long or __int64 as template parameters?

I guess so - on compilers that support one or the other. long long is
(still) not part of the C++ standard, AFAIK.

>
> Also, CUJ had an article about implementing infinite length numbers 
> at compile time using templates. May be useful here.

I haven't seen that issue - is it available online? Anyway I would
guess that the same worry about complexity and notation applies. It's
a common question as to whether you should complicate the current
implementation in preparation for possible extensions in the
future. If those extensions never become necessary, you've created a
lot more effort (including implementation, documentation, maintenance,
user confusion, etc.) for no actual benefit.

-- 
Raoul Gough.
export LESS='-X'





More information about the Cplusplus-sig mailing list