Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active October 6, 2017 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/708bb324981e37032248984353cb41db to your computer and use it in GitHub Desktop.
Save deque-blog/708bb324981e37032248984353cb41db to your computer and use it in GitHub Desktop.
template<class T>
using container_t =
typename std::conditional<
std::is_copy_constructible<T>{}(),
std::vector<T>,
std::list<T>>::type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment