Created
February 25, 2015 14:53
-
-
Save alepez/210d4875cd4fcd17471e to your computer and use it in GitHub Desktop.
Universal constructor template, excluding copy/move constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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