|
Boost : |
From: Daniel James (daniel_james_at_[hidden])
Date: 2007-12-20 13:48:43
Hi Steve,
The answer to most of your questions is 'no, no reason', 'no, I don't
want ADL' or 'okay, I'll do that'. Apart from those below.
On 20/12/2007, Steven Watanabe <steven_at_[hidden]> wrote:
> I don't think the test used is correct. The following program prints "0"
> under msvc 8.0:
>
> #include <limits>
> #include <iostream>
>
> int main() {
> std::cout << static_cast<std::size_t>(
> static_cast<float>(std::numeric_limits<std::size_t>::max())) << std::endl;
> }
I'll look into this soon (I don't have access to windows at home right now).
> line 1282:
> return float_to_size_t(ceil(
> should qualify ceil with std::
>
> line 1361:
> rehash_impl(static_cast<size_type>(floor(n / mlf_ * 1.25)) + 1);
> *std::*floor?
Both of these are preceded by 'use namespace std'. I was trying to
support libraries that don't define the functions in the std
namespace. ADL shouldn't be a problem here as the arguments are
floats. But I could use the compatibility headers instead.
> I'm getting a lot of warnings on the tests from msvc 8.0 with /W4
> because minimal::ptr/const_ptr only defines operator+(int) and the internals
> call operator+ with a size_t. Is + required to work for the size_type
> or should it be cast to the difference_type explicitly?
I don't think the standard specifies exactly what the minimum
requirements for 'Allocator::pointer' are. But I'd expect operator+ to
use difference_type so I'll add casts. Maybe I should check for
allocators which return a 'max_size' which doesn't fit into
difference_type.
Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk