MᏫᎻᎯᎷᎷᎬᎠ
show me them codes
It's simple as this int&& r = 1; r = 7;
MᏫᎻᎯᎷᎷᎬᎠ
This is valid
BinaryByter
well yes
BinaryByter
where is the difference between this and
BinaryByter
int& r = 1;
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
wat?
BinaryByter
@ollirz
BinaryByter
explain
MᏫᎻᎯᎷᎷᎬᎠ
Reference must refer to an object
MᏫᎻᎯᎷᎷᎬᎠ
Reference must refer to an object
Unless it's a const reference
MᏫᎻᎯᎷᎷᎬᎠ
Damn maxi what Happened to you?!
MᏫᎻᎯᎷᎷᎬᎠ
2 month knocked you off xD
BinaryByter
no its just that I never cared to learn rules that I I will never need
BinaryByter
and that will never serve me
MᏫᎻᎯᎷᎷᎬᎠ
Okay
BinaryByter
you know, learning those rules by heart won't serve you anything
Anonymous
Moo 🐮
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
Mihail
Moo 🐮
On topic, please
BinaryByter
Moo 🐮
/ban joins and is a cow
Dima
What?
MᏫᎻᎯᎷᎷᎬᎠ
not really
It's like basics
BinaryByter
What is this?
he "moos" just after joining
Dima
so?
BinaryByter
which shows that he hasn't read the rules
MᏫᎻᎯᎷᎷᎬᎠ
int& r = 1; Is wrong
BinaryByter
because its offtopic
BinaryByter
Dima
Maybe he's cow nation and that means hello
BinaryByter
Why?
needs to reference to an object
BinaryByter
yea, now I remember
MᏫᎻᎯᎷᎷᎬᎠ
Why?
Cuz reference always refers to an object
Mihail
because its offtopic
Should've warned tbh
BinaryByter
Should've warned tbh
¯\_(ツ)_/¯
MᏫᎻᎯᎷᎷᎬᎠ
1 isn't an object
MᏫᎻᎯᎷᎷᎬᎠ
Mihail
Cuz reference always refers to an object
So why is int&& valid then?
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Even it's valid The question is Why it can be changed?
BinaryByter
are you SURE that it is valid?
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
or is it just your compiler which is not conform to the standard?
BinaryByter
no compiler is completely compliant
MᏫᎻᎯᎷᎷᎬᎠ
Okay
MᏫᎻᎯᎷᎷᎬᎠ
Try it on yours
Mihail
How about g++
clang ftw
BinaryByter
Try it on yours
meh, too lazy
MᏫᎻᎯᎷᎷᎬᎠ
I hope it's not valid
MᏫᎻᎯᎷᎷᎬᎠ
Cuz it'll just confuse me
MᏫᎻᎯᎷᎷᎬᎠ
Okay
MᏫᎻᎯᎷᎷᎬᎠ
I got an idea
BinaryByter
try it on clang
MᏫᎻᎯᎷᎷᎬᎠ
How about we test it on Rextester
BinaryByter
== g++
Mihail
Mihail
Also Lunatic
MᏫᎻᎯᎷᎷᎬᎠ
== g++
Maybe my g++ sucks for some reason xD
Mihail
That's just a different reference
Mihail
And not a reference of a reference
Mihail
Apparently called a "rvalue reference"
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
There's no such thing is called reference to reference
BinaryByter
that would make sense
Mihail
MᏫᎻᎯᎷᎷᎬᎠ
So what are the parameters in the move constructor
BinaryByter
how about you try it with (int&)& a = 1;?