22 if(
auto name = lookup_static_oid(oid)) {
24 throw Invalid_State(
"Cannot register two different names to a single OID");
32 auto o2s = m_oid2str.find(oid);
34 if(o2s == m_oid2str.end()) {
35 m_oid2str.insert(std::make_pair(oid, str));
36 }
else if(o2s->second != str) {
37 throw Invalid_State(
"Cannot register two different names to a single OID");
40 auto s2o = m_str2oid.find(std::string(str));
42 if(s2o == m_str2oid.end()) {
43 m_str2oid.insert(std::make_pair(str, oid));