It seems safe to cast the result of my vector\'s size() function to an unsigned int. How can I tell for sure, though? My documentation isn\'t cle
size()
unsigned int
I'm not sure how well this will work because I'm just thinking off the top of my head, but a compile-time assertion (such as BOOST_STATIC_ASSERT() or see Ways to ASSERT expressions at build time in C) might help. Something like:
BOOST_STATIC_ASSERT()
BOOST_STATIC_ASSERT( sizeof( unsigned int) >= sizeof( size_type));