-#define BSEARCH(t, ar, start, size, val) \
+#define BSEARCH(t, ar, start, size, val) \
+ BSEARCH_CMP(t, ar, start, size, val, BSEARCH_IS_T)
+
+/*! Search an array @ar, starting at index @start,
+ with @size elements, looking for value @val of type @t,
+ using the macro @to_t to convert values in the arrau @ar to type @t.*/
+#define BSEARCH_CMP(t, ar, start, size, val, to_t) \