Skip to content

Instantly share code, notes, and snippets.

@alepez
Created February 25, 2015 14:53
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 alepez/210d4875cd4fcd17471e to your computer and use it in GitHub Desktop.
Save alepez/210d4875cd4fcd17471e to your computer and use it in GitHub Desktop.
Universal constructor template, excluding copy/move constructor
class Bar {
template<typename T, typename = typename std::enable_if< !std::is_same<Foo, typename std::decay<T>::type >::value >>
inline Bar(T&& v) { }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment