Ourinitialsetofrulesemphasizessafety(ofvariousforms)andsimplicity.Theymayverywellbetoostrict.Weexpectto
havetointroducemoreexceptionstobetteraccommodaterealworldneeds.Wealsoneedmorerules.
Youwillfindsomeoftherulescontrarytoyourexpectationsorevencontrarytoyourexperience.Ifwehaven'tsuggested
youchangeyourcodingstyleinanyway,wehavefailed!Pleasetrytoverifyordisproverules!Inparticular,we'dreally
liketohavesomeofourrulesbackedupwithmeasurementsorbetterexamples.
You will find some of the rules obviousor even trivial. Please remember that one purpose of a guideline is to help
someonewhoislessexperiencedorcomingfromadifferentbackgroundorlanguagetogetuptospeed.
Manyoftherulesaredesignedtobesupportedbyananalysistool.Violationsofruleswillbeflaggedwithreferences(or
links) to the relevant rule.We do not expect you to memorize all the rules before trying to write code. One way of
thinkingabouttheseguidelinesisasaspecificationfortoolsthathappenstobereadablebyhumans.
Therulesaremeantforgradualintroductionintoacodebase.Weplantobuildtoolsforthatandhopeotherswilltoo.
Commentsandsuggestionsforimprovementsaremostwelcome.Weplantomodifyandextendthisdocumentasour
understandingimprovesandthelanguageandthesetofavailablelibrariesimprove.
In:Introduction
This is a set of core guidelines for modern C++, C++14, taking likely future enhancements and ISO Technical
Specifications (TSs) into account. The aim is to help C++ programmers to write simpler, more efficient, more
maintainablecode.
Introductionsummary:
In.target:Targetreadership
In.aims:Aims
In.not:Nonaims
In.force:Enforcement
In.struct:Thestructureofthisdocument
In.sec:Majorsections
In.target:Targetreadership
AllC++programmers.ThisincludesprogrammerswhomightconsiderC.
In.aims:Aims
The purpose of this document isto helpdevelopers toadopt modernC++ (C++11, C++14, and soon C++17) and to
achieveamoreuniformstyleacrosscodebases.
评论0
最新资源