|
Boost : |
From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2005-12-15 05:54:14
----Original Message----
From: Markus Schöpflin [mailto:markus.schoepflin_at_[hidden]]
> (std::min)(it->m_alloc.size, (unsigned)8 )
> I think the (unsigned)8 should actually read
> static_cast<std::size_t>(8),
> or perhaps just use (std:min<std::size_t>) instead.
I presume the parens around std::min are to prevent VC expanding the "min"
macro. If so, then adding the expliction specialization should do that
anyway, so the code can read:
std::min<std::size_t>(it->m_alloc.size, 8 )
Which remarkably is only one character longer than the unfixed code (and
doesn't have a c-style cast).
-- Martin Bonner Martin.Bonner_at_[hidden] Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk