Created
November 13, 2018 23:47
-
-
Save slavanap/9ce05fea331902b88200f1cad75ac8bd 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
template<typename ... TArgs> | |
void prn() { | |
((cout << typeid(TArgs).name() << endl), ...); | |
}; | |
template<typename Function> | |
struct f; | |
template<typename TReturn, typename... TArgs> | |
struct f<TReturn(TArgs...)> { | |
f() { | |
prn<TReturn(TArgs...)>(); | |
prn<TReturn>(); | |
prn<TArgs...>(); | |
} | |
}; | |
int main() { | |
using T = int(float, double); | |
f<T>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment