Guest User

Untitled

a guest
May 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. int && fun(){
  2. return 1;
  3. }
  4. int main(){
  5. int & a=fun();
  6. }
  7.  
  8. error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
  9.  
  10. int & fun(){
  11. return *(new int);
  12. }
  13. int main(){
  14. int & a=fun();
  15. }
  16.  
  17. int && fun(){
  18. return 1;
  19. }
  20. int main(){
  21. decltype(fun()) b=1;
  22. }
Add Comment
Please, Sign In to add comment