POV-Ray : Newsgroups : povray.off-topic : Haskell arrays : Re: Haskell arrays Server Time
29 Sep 2024 21:24:21 EDT (-0400)
  Re: Haskell arrays  
From: Fredrik Eriksson
Date: 10 Mar 2009 16:26:43
Message: <op.uqle2znd7bxctx@e6600>
On Tue, 10 Mar 2009 21:08:05 +0100, Orchid XP v8 <voi### [at] devnull> wrote:
> Warp wrote:
>>   OTOH this actually causes more trouble than it's worth, as it makes
>> std::vector behave in certain cases rather differently when the element
>> type is bool compared to any other element type. This is a common  
>> complaint.
>
> ...because C++ "bool" is actually some mannar of integer?

No, because std::vector<bool> is specialised in such a way that:
  1 - It is not a container (not as the C++ standard defines them)
  2 - It does not actually contain values of type 'bool'

It is one of those things that seemed like a good idea at the time, but  
did not turn out so good in practice.


-- 
FE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.