Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template foo(A, B, C)
- {
- void foo(A a){}
- void foo(B b){}
- void foo(A c){}
- }
- // is logically equivalent to:
- auto foo(A, B, C)
- {
- // type of {} is deduced to be an overloadset, that is a tuple of
- // identically named functions
- return #{
- (A a){}
- (B b){}
- (A c){}
- }
- }
Add Comment
Please, Sign In to add comment