void merger::check_name(const std::string& model_name, const name& key, const name& value) const { if (key.location().original_model_name() != model_name) { std::ostringstream s; s << "Type does not belong to this model. Model name: '" << model_name << "'. Type name: " << key.qualified(); BOOST_LOG_SEV(lg, error) << s.str(); BOOST_THROW_EXCEPTION(merging_error(s.str())); } if (key != value) { std::ostringstream s; s << "Inconsistency between key and value names: " << " key: " << key.qualified() << " value: " << value.qualified(); BOOST_LOG_SEV(lg, error) << s.str(); BOOST_THROW_EXCEPTION(merging_error(s.str())); } }
inline bool operator<(const name& lhs, const name& rhs) { return lhs.qualified() < rhs.qualified(); }