#include <iostream> #include <queue> #include <list> int main(int argc, char *argv[]) { std::list<int> v = {1, 2, 3, 4}; std::queue<int, std::list<int>> q(v); q.push(5); q.pop(); std::cout<<"Front: "<<q.front()<<std::endl;//2 std::cout<<"Back: "<<q.back()<<std::endl;//5 return 0; }