Do not use std functions for CompareQueue