Skip to content

Instantly share code, notes, and snippets.

@Akira-Hayasaka
Last active June 23, 2022 20:15
Show Gist options
  • Save Akira-Hayasaka/4949752 to your computer and use it in GitHub Desktop.
Save Akira-Hayasaka/4949752 to your computer and use it in GitHub Desktop.
c++ copy vector into deque
std::copy(vector.begin(), vector.end(), std::inserter(deque, deque.end()));
@WillemvJ
Copy link

Nice. Perhaps add #include .

@Badhansen
Copy link

You can also use deque constractor.
deque<int> dt(cardPoints.begin(), cardPoints.end());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment