when thinking about design decisions of my code regarding one-to-one relations I came to think about if I should use std::vector<std::pair<T1, T2>> instead of std::map<T1, T2>, and implement two methods A to B and B to A myself.
I can't use boost, so the answer to this question I found about it (One-to-one relation in STL terms) is not really fitting.
Is there some STL equivalent doing this job? Or do you think the vector is a bad idea? There won't be many entries in the struct ( < 10) but there will be a lot of access on it.
I think in your case, you could try
std::unordered_map<T1,T2>andstd::unordered_map<T2,T1>. By using two unordered_map, you could do A2B and B2A both in O(1) time, which is faster than map or vector.