In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the recommendations for the implementation of C++", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn what are the recommendations for the implementation of C++.
In.force: Enforcement (implementation recommendations)
For large-scale code, rules that do not contain implementation recommendations cannot be managed. Recommendations for the implementation of all rules may exist only if the number of rules is small and for a specific group of users.
But we want lots of rules, and we want rules that everybody can use. But we want a lot of rules, and we want rules that everyone can use.
But different people have different needs. But different people have different needs.
But people don't like to read lots of rules. But people don't like to understand a lot of rules.
But people can't remember many rules. But people can't remember a lot of rules.
So, we need subsetting to meet a variety of needs. Therefore, we need to construct a subset of rules to meet different requirements.
But arbitrary subsetting leads to chaos. But freewheeling assembly of constructors leads to chaos.
Our guidelines that help many people make the code more uniform and strongly recommend that people modernize their code. We want to encourage best practices rather than leave everything to personal choice and management pressure. This idea applies to all rules; it will bring huge benefits.
These ideas add up to cause a lot of trouble. We try to use tools to solve these problems. Each rule has an implementation recommendation to list implementation-related ideas. This can be done through code review, static analysis, compiler, or execution-time checking. Whenever possible, we recommend mechanical inspection (people are slow, inaccurate and easily bored) and static inspection. It is rare that dynamic checks are recommended only when there are no other alternative exits; we (in the implementation recommendation) are labeled with the general name of a set of relevant rules (referred to as "overview"). Rules can be multiple profiles that are subordinate to multiple different profiles, or they do not belong to any overview. As a start, we already have several outlines for responding to common needs (wishes, ideals)
Translator's note: static checking is emphasized again.
Type: No type violations (reinterpreting a T as a U through casts, unions, or varargs) types: no type violations (T is reinterpreted as U by type conversion, federation, or variable arguments)
Bounds: No bounds violations (accessing beyond the range of an array) range: no range violation (access out of array range)
Lifetime: No leaks (failing to delete or multiple delete) and no access to invalid objects (dereferencing nullptr, using a dangling reference). Declaration period: no leaks (no delete or multiple delete) and access to invalid objects (null pointer values, using wild pointers)
The purpose of the overview is to be used by tools, but it can also help human readers. For users that we know how to implement, we will not begrudge our description in the implementation recommendations. Some explanations are simply intended to inspire some tool builders to think.
Tools that implement these rules shall respect the following syntax to explicitly suppress a rule:
Tools that implement these rules should follow the following syntax to explicitly suppress a rule.
[[gsl::suppress (tag)]]
Where "tag" is the anchor name of a project, there should be implementation recommendations (for example, "Rh-publicc" for C.134), rule group names ("type", "bounds", or "lefttime"), or specific rules in the overview.
Translator's note: suppression means ignoring a rule.
At this point, I believe you have a deeper understanding of "what are the recommendations for the implementation of C++?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.