SHARE
TWEET

Untitled

a guest Feb 11th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top