-
-
Save codehz/b18c62d104f2b7f1a4f3bfb44c5d249b to your computer and use it in GitHub Desktop.
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
#include <vector> | |
template <typename T> | |
struct unwrap { | |
using type = T; | |
}; | |
template <template <typename> typename wrapper, typename T> | |
struct unwrap<wrapper<T>> { | |
using type = T; | |
}; | |
template <template <typename, typename> typename wrapper, typename T, typename R> | |
struct unwrap<wrapper<T, R>> { | |
using type = T; | |
}; | |
int main() { | |
typename unwrap<std::vector<int>>::type a = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment