Added a templated version of sizeof to support something like libc qsort