|
Boost Users : |
From: John Harris (john.harris_at_[hidden])
Date: 2003-04-23 09:01:21
--- In Boost-Users_at_[hidden], scleary_at_j... wrote:
> > The pool code about which the following warnings complain:
> >
> > const size_type num_chunks = total_req_size / partition_size +
> > static_cast<bool>(total_req_size % partition_size);
> >
>
> The cast is intentional. The intent is to add one if the result of
the
> modulus is non-zero. I don't know why the compiler is producing
warnings,
> since I'm using an explicit cast.
>
It's complaining, I think, because of the mixing of bool and size_t
in the same calculation. I verified that it works correctly,
however. I was afraid that num_chunks would be 0 or 1 only, but that
is not the case. So no really bad problem here.
> > Another test I tried was a map<string,string>, actually declared
like
> > this:
>
> I'm having a hard time deciphering the compiler errors (I'm not
used to MSVC
> errors), but it looks like it might be a problem in the STL. Have
you tried
> this with STLPort?
>
No. I want to stick with the standard STL. Which, I hope, is pretty
solid by now in VC7.1. It's changed drastically since VC6.x.
> Is MSVC available for download for non-MSDN subscribers? If so, I
can
> download it and try to get it working.
No. You have to have a universal subscription to get to it. Maybe
the SourceForge compiler farm has one.
Thanks for your reply. It'd be awesome if I could have my own
separate allocator for my maps.
jh
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