queue API fixed using std::rotate