Code: Select all
#include <array>
constexpr auto mapping = [] {
std::array<int, 128> ret{};
ret['K'] = 1;
ret['Q'] = 2;
return ret;
}();

Code: Select all
#include <array>
constexpr auto mapping = [] {
std::array<int, 128> ret{};
ret['K'] = 1;
ret['Q'] = 2;
return ret;
}();