olli
where's the difference to returning an anonymous obj?
It's always possible for anonymous objects, that does not apply for named ones. If it's possible its nearly certain your compiler will do nrvo as well
olli
you can't always copy named objects?
RVO basically stores the returned value in the destination of the function call E.g. std::string foo() { return "hi"; } std::string s = foo(); The compiler can tell the location of s and which content needs to go inside. Take e.g. std::string foo(int arg) { std::string s1,s2; bool cond = magic (); return cond ? s1 : s2; } Well now it's impossible, which of those two strings shall be constructed in the returned place s?
Dima
I got the idea for your programming challeneges : implement IOC in C++ with -fno-rtti
olli
why woudl it matter that the string to be copied can't be evaluated at compile time?
To enable copy Ellison you need to know where the result will be stored.
BinaryByter
but it doesnt matter
BinaryByter
strings always have the same size
olli
Yeah sure, but in the first case your compiler will not create a local variable for you but instead use s (from the calling side)
olli
In the second case you create two locals, but you cannot say whose value will survive the end of it's scope. Once you know it you need to copy it
BinaryByter
Yeah sure, but in the first case your compiler will not create a local variable for you but instead use s (from the calling side)
but can't it do that without knowing which one of the str's are used beforehand?
BinaryByter
So NRVO and RVO relies a lot on compile time
BinaryByter
so move semantics make sense, in case of SOME NRVO problems?
olli
On deterministic behavior at compile time
BinaryByter
that makes sense
olli
so move semantics make sense, in case of SOME NRVO problems?
If moving is faster than copying, probably. But "don't be smarter than your compiler" :)
BinaryByter
We are :D
BinaryByter
Hello :)
Yunus Emre
I did. and thanks.
BinaryByter
How are you?
Yunus Emre
I am ok. what about ya?
BinaryByter
Meh
BinaryByter
fine
BinaryByter
I hate unit tests
Yunus Emre
Haha, which book?
BinaryByter
wat?
BinaryByter
i'm unit testing a project
BinaryByter
i'm not a pleb who reads books :D
BinaryByter
lol jkjk
Yunus Emre
Ah oops
BinaryByter
clinl.org
BinaryByter
;_;
BinaryByter
such a big project
BinaryByter
so many ways to go wrong
Yunus Emre
I am learning c from Deitel's book.
BinaryByter
don't learn C
BinaryByter
learn C++
BinaryByter
C is antiquated
BinaryByter
you CAN use it
Yunus Emre
After to c will c++ too
BinaryByter
No
BinaryByter
learn C++ directly
BinaryByter
C++ is NOT C with "something" added
Yunus Emre
İt's hard to me.
BinaryByter
you should learn C++ as a completely new language
BinaryByter
İt's hard to me.
C++ isn't a lot harder than C
BinaryByter
but it will prevent you from seeing a huge amount of little shits
Dima
wtffffff
Dima
you’ll see a lot of huge amounts in c++
Dima
lol
Yunus Emre
People saying python is easy.
BinaryByter
you’ll see a lot of huge amounts in c++
You can seemlessly cast types in C
BinaryByter
You can pass wrong type pointers in C
BinaryByter
So many ways to fuck yourself up
Dima
so
BinaryByter
not to mention the horrendous ways you have to hack OOP together in C
Dima
that’s your prob if you do
Dima
LOL
Dima
careful… gotta be careful
Yunus Emre
Omh
Yunus Emre
Anyone know unigram?
Dima
is this advertisement
Dima
R E P O R T
Yunus Emre
is this advertisement
No it's application for telegram.
Dima
still sounds suspicious
Yunus Emre
Main telegram apps are not accessible for blinds.
Yunus Emre
Just i tried to say anyone can some help it's developer for more accesibility.
BinaryByter
careful… gotta be careful
I prefer the compiler telling me how bad I am over my boss yanking me out of the company
Dima
still your probs lol
Dima
lol
Anonymous
I'm the champion
Anonymous
Anonymous
/😂😂😂
Marie
/😂😂😂
/Huh😂😂
Anonymous
Anonymous
/Huh😂😂
Do any one know how to create a bot
Satyam