RE: pool_allocator problems on VC7.1 (real release)
-----Original Message----- From: John Harris [mailto:john.harris@tradingtechnologies.com]
I also tried this on the real released VC7.1 (which has been on MSDN subscriber downloads for a couple of weeks, now), and, while it compiles, I get warnings that point me to some code that looks like it's losing precision (size_type reduced to bool) in a calculation.
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.
Another test I tried was a map
, 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?
If you have an example of a map
using pool_allocator that compiles on VC7.1, I'd *love* to see it. That's all I'm really after, here.
Is MSVC available for download for non-MSDN subscribers? If so, I can download it and try to get it working. -Steve
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
--- In Boost-Users@yahoogroups.com, scleary@j... wrote: the
modulus is non-zero. I don't know why the compiler is producing warnings, since I'm using an explicit cast.
Another test I tried was a map
, actually declared
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. 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
participants (2)
-
John Harris
-
sclearyï¼ jerviswebb.com