Advertisement
Guest User

Untitled

a guest
Nov 7th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. struct wrapper
  2. {
  3.     string const& val;
  4. };
  5.  
  6. auto&& a = wrapper{string("123")};
  7.  
  8. // wrapper's life-time is supposed to be extended, but what about the string's?
  9. // is a.val supposed to be valid as well?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement