template_switch C++14 template switch-case with O(1) jump table or O(logN) binary search or O(N) linear search