|
Boost : |
Subject: [boost] [serialization][1_42_0] basic_binary_oarchive - warning: comparison is always true due to limited range of data type
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-04-06 08:59:10
basic_binary_oarchive.hpp has this member:
void save_override(const class_id_type & t, int){
// upto 32K classes
assert(t.t <= boost::integer_traits<boost::int_least16_t>::const_max);
const boost::int_least16_t x
= static_cast<const boost::int_least16_t>(t.t);
* this->This() << x;
}
It doesn't seem that there is a need for this runtime assert at all
given the definition:
BOOST_ARCHIVE_STRONG_TYPEDEF(int_least16_t, class_id_type)
Can't the assert be removed to quiet the gcc warning?
Jeff
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk