Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int && fun(){
- return 1;
- }
- int main(){
- int & a=fun();
- }
- error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
- int & fun(){
- return *(new int);
- }
- int main(){
- int & a=fun();
- }
- int && fun(){
- return 1;
- }
- int main(){
- decltype(fun()) b=1;
- }
Add Comment
Please, Sign In to add comment