Build variadic function sort at compile-time