Guest User

Untitled

a guest
Feb 11th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 0.32 KB | None | 0 0
  1. template foo(A, B, C)
  2. {
  3.     void foo(A a){}
  4.     void foo(B b){}
  5.     void foo(A c){}
  6. }
  7.  
  8. // is logically equivalent to:
  9.  
  10. auto foo(A, B, C)
  11. {
  12.     // type of {} is deduced to be an overloadset, that is a tuple of
  13.     // identically named functions
  14.     return #{
  15.         (A a){}
  16.         (B b){}
  17.         (A c){}
  18.     }
  19. }
Add Comment
Please, Sign In to add comment