BinaryByter
BinaryByter
I could make a RAII wrapper
BinaryByter
https://en.cppreference.com/w/cpp/utility/functional/reference_wrapper
MᏫᎻᎯᎷᎷᎬᎠ
yea something like that
Then just type auto& rv = getVector();
MᏫᎻᎯᎷᎷᎬᎠ
and then?
Ur goal?!!!
MᏫᎻᎯᎷᎷᎬᎠ
🤷‍♂
BinaryByter
Ur goal?!!!
won't compile because of
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
BinaryByter
well it will compile
BinaryByter
but i have the maximum warnings mode on
MᏫᎻᎯᎷᎷᎬᎠ
But it did in mine
BinaryByter
which means that you will get a reference to a glaring cup of empty
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
x-actly
BinaryByter
so time to make myself a reference wrapper in util
BinaryByter
Wht is this
i'll send a screenshot in like two minutes lol
BinaryByter
here ya go
BinaryByter
@BOND_0O7
MᏫᎻᎯᎷᎷᎬᎠ
@BOND_0O7
I'm here
MᏫᎻᎯᎷᎷᎬᎠ
Let's c it
BinaryByter
dont bail out when seing variadic template args lol
MᏫᎻᎯᎷᎷᎬᎠ
I didn't understand anything😂😂
MᏫᎻᎯᎷᎷᎬᎠ
Sorry
MᏫᎻᎯᎷᎷᎬᎠ
Lemme Google sth
MᏫᎻᎯᎷᎷᎬᎠ
Class..
BinaryByter
fixed compiler errors lol
klimi
Throw hmmm
MᏫᎻᎯᎷᎷᎬᎠ
fixed compiler errors lol
Sorry maxi I don't know wht class ... means :-(
MᏫᎻᎯᎷᎷᎬᎠ
I wish I could help u
BinaryByter
I wish I could help u
no you don't need to help me
BinaryByter
I just showed you my generic RAII wrapper
BinaryByter
Throw hmmm
too lazy to write an exception class
BinaryByter
gotta do that later
MᏫᎻᎯᎷᎷᎬᎠ
I just showed you my generic RAII wrapper
And I don't know wht the hell it is 😆
BinaryByter
class... unpacks a variadic template/variadic function argument
BinaryByter
luckily we have compile time template resolution
BinaryByter
else it might become very tedious
BinaryByter
Time to slowly change everything step by step in the hope of not breaking anything
BinaryByter
or no
BinaryByter
lets start by unit testing
BinaryByter
Suicide 101!
whats the better option?
Marie
std::move doesnt seem to do what I want ot
std::move does seem to do what I want ot
BinaryByter
std::move does seem to do what I want ot
so how would I return a vector without copying?
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
Reference men :-D
again: it doesnt work
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
Well why it does here?
you return a glass of glamourously glaring glazed empty
BinaryByter
it compiles
BinaryByter
but not when you add the static code analysis flags
MᏫᎻᎯᎷᎷᎬᎠ
Sorry
BinaryByter
Lol no problem ;)
MᏫᎻᎯᎷᎷᎬᎠ
⁦O:-)⁩
BinaryByter
BinaryByter
lol got the time down by a decent portion
MᏫᎻᎯᎷᎷᎬᎠ
It worked?
BinaryByter
yea
BinaryByter
instead of return vector return std::move (vector);
BinaryByter
though I don't return a reference
BinaryByter
I return a POV
MᏫᎻᎯᎷᎷᎬᎠ
Congrats
BinaryByter
thanqyoue :D
MᏫᎻᎯᎷᎷᎬᎠ
Pretend like I know wht u r talking about?😂
MᏫᎻᎯᎷᎷᎬᎠ
I know that
BinaryByter
Move
okay did it
Ибраги́м
okay did it
U stubborn bone
BinaryByter
BinaryByter
I love myself
Ибраги́м
why?
U did what u were avoiding