The copy-and-swap idiom in C++20 [closed] - 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 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.

Related

What is zero overhead principle in C++? Examples? [closed]

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?

Are Alexandrescu's Ideas relevant with modern C++? [closed]

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'm starting to read Alexandrescu's modern c++ design and I'm interested in following question. Are ideas described in this book still relevant with modern C++?
The ideas are certainly relevant and the principles and techniques Andrei describes are still valid. Probably some if not all the examples would be written differently now, to exploit language elements that were not available when he wrote the book.
Actually some of the ideas he presents in his book have been included in the current standard, even if in a different form.

Why is following the standard considered to produce unreadable code or to be impossible? [closed]

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++)

Will biginteger equivalent be introduced in the c++1y standard [closed]

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 9 years ago.
Improve this question
I remember a while ago I heard that there were thoughts of including a BigInteger implementation in the c++0x standard(as it was called back then). Apparently this did not happen but I was wondering if this is planned as part of c++1y or not.
The unbounded integer library is being worked on in SG6, the Numerics study group. It will probably go into a Technical Specification (TS, what used to be called a TR) once we sort out a few things about its interface and about interoperability of library numeric types.
The latest official paper on the subject is N3542. It is not slated for inclusion in C++14.

Is relying on short-circuit evaluation good design? [closed]

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.