diff --git a/src/archive_exception.cpp b/src/archive_exception.cpp index 773081b5..589915c3 100644 --- a/src/archive_exception.cpp +++ b/src/archive_exception.cpp @@ -61,8 +61,8 @@ archive_exception::archive_exception( case array_size_too_short: m_msg = "array size too short"; break; - case stream_error: - m_msg = "stream error"; + case input_stream_error: + m_msg = "input stream error"; break; case invalid_class_name: m_msg = "class name too long"; @@ -89,6 +89,9 @@ archive_exception::archive_exception( m_msg += e1; } break; + case output_stream_error: + m_msg = "output stream error"; + break; default: assert(false); break; diff --git a/src/basic_iarchive.cpp b/src/basic_iarchive.cpp index 424c0e9d..c06b9b75 100644 --- a/src/basic_iarchive.cpp +++ b/src/basic_iarchive.cpp @@ -291,11 +291,6 @@ inline class_id_type basic_iarchive_impl::register_type( const basic_iserializer & bis ){ - assert( - cobject_info_set.size() - <= - boost::integer_traits::const_max - ); class_id_type cid(cobject_info_set.size()); cobject_type co(cid, bis); std::pair @@ -320,7 +315,7 @@ basic_iarchive_impl::load_preamble( ){ if(! co.initialized){ if(co.bis_ptr->class_info()){ - class_id_optional_type cid; + class_id_optional_type cid(class_id_type(0)); load(ar, cid); // to be thrown away load(ar, co.tracking_level); load(ar, co.file_version); @@ -380,7 +375,7 @@ basic_iarchive_impl::load_object( object_id_type this_id; moveable_objects_start = - this_id = object_id_vector.size(); + this_id = object_id_type(object_id_vector.size()); // if we tracked this object when the archive was saved if(tracking){ @@ -391,7 +386,7 @@ basic_iarchive_impl::load_object( // add a new enty into the tracking list object_id_vector.push_back(aobject(t, cid)); // and add an entry for this object - moveable_objects_end = object_id_vector.size(); + moveable_objects_end = object_id_type(object_id_vector.size()); } // read data (bis.load_object_data)(ar, t, co.file_version); @@ -416,11 +411,6 @@ basic_iarchive_impl::load_pointer( return bpis_ptr; } - assert( - cobject_info_set.size() - <= - boost::integer_traits::const_max - ); // if its a new class type - i.e. never been registered if(class_id_type(cobject_info_set.size()) <= cid){ // if its either abstract diff --git a/src/basic_oarchive.cpp b/src/basic_oarchive.cpp index 93ac1360..0fb0a7d9 100644 --- a/src/basic_oarchive.cpp +++ b/src/basic_oarchive.cpp @@ -224,11 +224,6 @@ basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { inline const basic_oarchive_impl::cobject_type & basic_oarchive_impl::find(const basic_oserializer & bos) { - assert( - cobject_info_set.size() - <= - boost::integer_traits::const_max - ); std::pair cresult = cobject_info_set.insert(cobject_type(cobject_info_set.size(), bos)); return *(cresult.first); @@ -238,11 +233,6 @@ inline const basic_oarchive_impl::cobject_type & basic_oarchive_impl::register_type( const basic_oserializer & bos ){ - assert( - cobject_info_set.size() - <= - boost::integer_traits::const_max - ); cobject_type co(cobject_info_set.size(), bos); std::pair result = cobject_info_set.insert(co); diff --git a/src/basic_xml_grammar.ipp b/src/basic_xml_grammar.ipp index 0d7682bb..312cd526 100644 --- a/src/basic_xml_grammar.ipp +++ b/src/basic_xml_grammar.ipp @@ -181,7 +181,7 @@ bool basic_xml_grammar::my_parse( ) const { if(is.fail()){ boost::serialization::throw_exception( - archive_exception(archive_exception::stream_error) + archive_exception(archive_exception::input_stream_error) ); } @@ -321,7 +321,7 @@ basic_xml_grammar::basic_xml_grammar(){ str_p(BOOST_ARCHIVE_XML_CLASS_ID()) >> NameTail >> Eq >> L'"' - >> int_p [xml::assign_object(rv.class_id.t)] + >> int_p [xml::assign_object(rv.class_id)] >> L'"' ; @@ -334,7 +334,7 @@ basic_xml_grammar::basic_xml_grammar(){ >> Eq >> L'"' >> L'_' - >> uint_p [xml::assign_object(rv.object_id.t)] + >> uint_p [xml::assign_object(rv.object_id)] >> L'"' ; @@ -372,7 +372,7 @@ basic_xml_grammar::basic_xml_grammar(){ str_p(BOOST_ARCHIVE_XML_VERSION()) >> Eq >> L'"' - >> uint_p [xml::assign_object(rv.version.t)] + >> uint_p [xml::assign_object(rv.version)] >> L'"' ;