In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to understand beyond the goals of C++ core guidelines". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In.not: Non-aims (outside the target)
These rules are not intended to be minimized and orthogonal. In general, general rules can be simple, but not mandatory. At the same time, it is generally difficult to understand the meaning of general rules. More specific rules are generally easier to understand and enforce. But if there are no general rules, the rules can only be a long list of special cases. When we prompt the rules, we want to help beginners and support the use of experts. Some rules are fully enforceable, while others are based on heuristics and guidance.
These rules do not require you to read from the back like a book. You can use links to navigate through them. However, the most anticipated usage is as a tool. That is, a tool for checking for rule violations and getting links to rules that have been violated. These rules can provide reasons, examples of potential consequences of violations and recommended improvement measures.
These guidelines are not intended to be a substitute for C++ induction training. If you need some level of tutoring, please refer to Resources.
Nor is this a guide to how to convert old C++ code into newer code. It's about the clear idea of generating new code in a specific way. However, the modernization part can be seen as a possible way to modernize / rejuvenate / upgrade. Importantly, these rules support step-by-step use: it is usually not suitable for a complete conversion of a large amount of code.
Nor are these guidelines intended to be complete and thorough in every technical detail of the language. For the final expression of the language definition, including every exception to the general rule, every function, etc., please refer to the ISO C++ standard.
These rules are not intended to force you to write code in a poor subset of C++. In particular, there is no intention to define a C++ subset of class Java. Nor do they intend to define a separate "real C++" language. We value expressiveness without compromising performance.
These rules are biased. They try to make the code simpler and more correct and secure than most existing C++ code. They want to ban C++ code that is completely legal but brings errors, unnecessary complexity and poor performance.
These rules are not so accurate that a person (or machine) can follow them blindly. The enforcement part tries to do this, but we prefer to make the rules or definitions a little ambiguous in order to explain rather than overly precise definitions lead to errors. Sometimes accuracy can only come from accumulation and experience. Design is not yet a form of mathematics.
The rules are not perfect. In some feature situations, it can become harmful by preventing something useful from happening. On certain occasions, rules may become harmful because they fail to prevent the generation of a series of errors. The rules can cause a lot of harm because they are vague, ambiguous, not feasible, or cause problems for each solution. There can be no completely harmless rule. On the contrary, our goal is less ambitious: "do what is as good as possible for most programs"; if you can't accept a rule, you can oppose it, ignore it, but don't implement it at a discount until it becomes meaningless. You can also make suggestions for improvement.
This is the end of the content of "how to understand beyond the goals of the C++ core guidelines". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.