Skip to content

Instantly share code, notes, and snippets.

@slavanap
Created November 13, 2018 23:47
Show Gist options
  • Save slavanap/9ce05fea331902b88200f1cad75ac8bd to your computer and use it in GitHub Desktop.
Save slavanap/9ce05fea331902b88200f1cad75ac8bd to your computer and use it in GitHub Desktop.
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