Re: [boost] Error in new boost.test

15 Dec
2005
15 Dec
'05
10:54 a.m.
----Original Message---- From: Markus Schöpflin [mailto:markus.schoepflin@comsoft.de]
(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@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434
7121
Age (days ago)
7121
Last active (days ago)
1 comments
2 participants
participants (2)
-
Gennadiy Rozental
-
Martin Bonner