Guest User

Untitled

a guest
Aug 10th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. To what granularity are expressions in function call parameters interleaved?
  2. void mad(cow_string a, cow_string b);
  3. cow_string s("moo");
  4. cow_string s1 = s;
  5. cow_string s2 = s;
  6. mad(s1+="haha",s2+="hahaha");
  7.  
  8. // In some header file:
  9. void f( T1*, T2* );
  10.  
  11. // In some implementation file:
  12. f( new T1, new T2 );
  13.  
  14. allocate memory for the T1
  15. construct the T1
  16. allocate memory for the T2
  17. construct the T2
  18. call f()
  19.  
  20. allocate memory for the T1
  21. allocate memory for the T2
  22. construct the T1
  23. construct the T2
  24. call f()
  25.  
  26. void mad(cow_string & a, cow_string & b);
  27. cow_string s("moo");
  28. cow_string s1 = s;
  29. cow_string s2 = s;
  30. mad(s1+="haha",s2+="hahaha");
  31.  
  32. int a = 5;
  33. foo(a+=9*4, a+=13/2);
Add Comment
Please, Sign In to add comment