News for hackers. Stuff that matters.

silent_hunter

"const string&" - will always make a copy of the string for first_name and last_name, if we write "Person(std::string first_name, std::string last_name) : first_name(first_name) , last_name(last_name) {}" in case passed arguments are lvalues they will be copied, otherwise moved.
"Eclipse CDT or Code::Blocks" - you should have put /s at the end of the sentence. And be careful with "it's just a smarter text editor" when around vi/emacs users.
Re:Even my mother can run Linux on Thursday January 12, 2017 @08:48AM (#13382123)
Hmm, my parents have a Win 7, I set their account to user level and gave a few lessons on security and in the last 4 years I didn't have any complains (except once with the printer which turned out to be because of a bad USB cable), so go figure, I guess you just didn't know how to properly set up a Windows system for basic users.
Re:Vivaldi – A Browser for Our Friends on Tuesday January 10, 2017 @07:12AM (#13364267)
Background tab is middle click, all browsers support it and it was in Opera for ages.
Re:Getting Past C on Wednesday January 04, 2017 @07:35AM (#13317717)
Use-after-move is allowed because of existence of value categories, if you use a return value from a function its creation is usually elided or it is moved, but you can't access that temporary without directly referencing it. When you move an existing object (by specifically saying std::move), what should happen with it? Destroying the object is not a solution because its variable might be still accessible in existing scope (something like dangling a reference in the middle of a scope), which imply use-after-move should be prohibited be language and all variables should have a "not-a-value" state and throw exceptions on use.
Re:Getting Past C on Wednesday January 04, 2017 @06:55AM (#13317498)
If C++ is "(nearly) a superset of C" why is the C++ standard twice the size of C standard? Of course if we take that 0.505.. ≈ 1, then it is indeed a (nearly) superset.