QPDF::maxEnd(ObjUser const& ou)
{
    if (this->m->obj_user_to_objects.count(ou) == 0)
    {
        stopOnError("no entry in object user table for requested object user");
    }
    std::set<QPDFObjGen> const& ogs = this->m->obj_user_to_objects[ou];
    qpdf_offset_t end = 0;
    for (std::set<QPDFObjGen>::const_iterator iter = ogs.begin();
	 iter != ogs.end(); ++iter)
    {
	QPDFObjGen const& og = *iter;
	if (this->m->obj_cache.count(og) == 0)
        {
            stopOnError("unknown object referenced in object user table");
        }
	end = std::max(end, this->m->obj_cache[og].end_after_space);
    }
    return end;
}
QPDF::maxEnd(ObjUser const& ou)
{
    if (this->m->obj_user_to_objects.count(ou) == 0)
    {
        stopOnError("no entry in object user table for requested object user");
    }
    std::set<QPDFObjGen> const& ogs = this->m->obj_user_to_objects[ou];
    qpdf_offset_t end = 0;
    for (std::set<QPDFObjGen>::const_iterator iter = ogs.begin();
	 iter != ogs.end(); ++iter)
    {
	QPDFObjGen const& og = *iter;
	if (this->m->obj_cache.count(og) == 0)
        {
            stopOnError("unknown object referenced in object user table");
        }
	end = std::max(end, this->m->obj_cache[og].end_after_space);
    }
    return end;
}