Guest User

Untitled

a guest
Nov 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. template<typename ... TArgs>
  2. void prn() {
  3. ((cout << typeid(TArgs).name() << endl), ...);
  4. };
  5.  
  6. template<typename Function>
  7. struct f;
  8.  
  9. template<typename TReturn, typename... TArgs>
  10. struct f<TReturn(TArgs...)> {
  11. f() {
  12. prn<TReturn(TArgs...)>();
  13. prn<TReturn>();
  14. prn<TArgs...>();
  15. }
  16. };
  17.  
  18. int main() {
  19. using T = int(float, double);
  20. f<T>();
  21. }
Add Comment
Please, Sign In to add comment