added std::vector version of check_ordered with tests