SHARE
TWEET

Untitled

tinyevil Jan 12th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template<class A, class B>
  2. class Pair{
  3.     A fst;
  4.     B snd;
  5. }
  6.  
  7. template<class A, class B>
  8. A get_fst(Pair<A,B> p){
  9.     return p.fst;
  10. }
  11.  
  12.  
  13. void main(){
  14.     Pair<()->i32, i32> p{() => 42, 17};
  15.     auto x = get_fst(p);
  16.     // does this compile?
  17.     // whats the type of x?
  18. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top