void OSQuantityVector::push_back(Quantity q) { if (!(q.units() == units())) { LOG_AND_THROW("Quantity " << q << " is incompatible with this OSQuantityVector, which has " "units " << units() << "."); } else if (q.scale() != scale()) { q.setScale(scale().exponent); } m_values.push_back(q.value()); }