Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Are there alternatives that would be more preferred?
Short-circuit evaluation is a crucial feature of most modern programming languages and there's no reason to avoid relying on it. Without it pointer-related tests would be (unnecessarily) much more complicated and less readable.
Of course it's good design, everyone knows to expect it and it beats using nested conditionals.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 months ago.
Improve this question
I found this great answer from 12 years ago that explains the copy-and-swap idiom and how to implement it in C++11 and C++03.
My question is: is this still the recommended solution or has it changed in later versions of C++? (specifically I'm currently using C++20)
If you need safety and comfort over performance, it is still best solution. Howard Hinnant recommends you roll your own but only if you really really know how to do it and really really need the last ounce of performance.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
When I am reading design goals of C++11, it mentioned about zero-overhead principle without any examples or features which uses this principle. I can understand that it could be there to avoid degrading existing code performance. But,
Can someone explain this concept with some examples?
Approach they made to implement such a feature in the standard?
How they enforce compiler-writers to implement this?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
To be honest (*this) looks a lot better than this->. They both function the same. Why shouldn't I use the former? Is it just common practice to use this->, or is there something more to it?
Actually both will have same results when accessing data-members. Though you find (*this) more elegant I would undoubtedly say most will disagree.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I was reading this post: https://stackoverflow.com/questions/1025494/obfuscating-c-c-code
The question is:
What tools are available to obfuscate C/C++ code....
An answer which had a bounty awarded to it says:
Follow the Standard insanely.
That'll be enough :)
I don't understand why people say following the standard would produce unreadable code or is impossible. Can someone explain what people mean in that post ? I'm a beginner programmer (in C / C++)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What are the advantages of C++ over the others languages in working with videodata and videodevices (developing object detection program). Thank you.
for object detection, you could use python, matlab, java and c++. You have to use c++ if you need substantially speed improvement (C++ is the fastest in most of the cases). You could also use OpenCv easily with c++ for face and object detection.