| 204 | template <size_t N> |
| 205 | struct dispatch_comparison { |
| 206 | static bool dispatch(const item* a, const item* b) { |
| 207 | if (N == a->kind() && N == b->kind()) { |
| 208 | auto A = static_cast<const type_by_kind::type<N>*>(a); |
| 209 | auto B = static_cast<const type_by_kind::type<N>*>(b); |
| 210 | return compare(*A, *B); |
| 211 | } |
| 212 | else { |
| 213 | return dispatch_comparison<N + 1>::dispatch(a, b); |
| 214 | } |
| 215 | } |
| 216 | }; |
| 217 | |
| 218 | template <> |