BFS implmented by std::queue