I have two enum classes (C++17) and I want to map them but must be resolved at compile-time due to some performance issues.
Metaprogramming is a bit tricky for me yet.
enum NAMES {A, B, C} enum LASTNAMES { A, B, C}
example:
Mapper::get<NAMES::A>::value // should return LASTNAMES::A
Mapper::get<NAMES::C>::value // should return LASTNAMES::C
we can use integers instead of the NAMES if it is not possible the case above.
1 ---> LASTNAMES::A
2 ---> LASTNAMES::B
....