I like coding standards. When writing C ++, I like coding standards. A good coding standard adds context to the language, which makes parsing difficult.
There are several commonly used standards that I think are at least a little familiar with:
- Participant variables prefixed with 'm' or 'm _'
- Class prefix (usually project-specific, ie in Qt all class names are prefixed with "Q")
- Include security agreements such as "take the file name in all caps, replace." with '_' "
- Rule of three
There are many small rules in C ++. Unfortunately, I have never been able to find rules that relate to patterns. I think the most popular template argument name is "T", but this is pointless, and if the template is not obvious, it can make the code even more difficult to read.
In any case, the main problem I am experiencing is that the templates are hard to read, and I think some conventions can be used to make them easier to read. Does anyone know of a widely used convention that makes it easy to read template code?
source
share