fork download
  1. #include <algorithm>
  2. #include <deque>
  3. #include <iterator>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. template <typename U>
  8. ostream& operator<< (ostream& out, const deque<U>& dq) {
  9. copy(cbegin(dq), cend(dq), ostream_iterator<int>(out, " "));
  10.  
  11. return out;
  12. }
  13.  
  14. int main() {
  15. const deque<int> foo{ 13, 42 };
  16.  
  17. cout << foo << endl;
  18. }
Success #stdin #stdout 0s 4396KB
stdin
Standard input is empty
stdout
13 42