# <a name="main"></a>C++ 핵심 가이드라인
> 2018년 9월 2일
편집자:
* [Bjarne Stroustrup](http://www.stroustrup.com)
* [Herb Sutter](http://herbsutter.com/)
이 문서는 오픈 소스 (코드) 프로젝트로, 지속적으로 개선되고 있으며 0.8 버전까지 배포되었다.
이 프로젝트의 복사, 사용, 수정, 파생 성과물과 관련된 저작권은 MIT와 유사한 라이선스를 따른다. 프로젝트에 기여하기 위해서는 기여자 라이선스(Contributor License)에 동의해야 한다. 보다 자세한 사항은 [LICENSE](../LICENSE)을 확인하라.
오픈 소스 프로젝트에 익숙한 사용자들이 사용, 복사, 수정, 파생 성과물들을 통해 건설적인 정보를 제공해주기 바란다.
개선 사항에 대한 의견과 제안은 대부분 환영한다. C++ 언어와 사용 가능한 라이브러리들이 발전하고, 이에 대한 이해가 깊어질수록 이 문서를 지속적으로 수정하고 확장할 것이다. 의견을 보내고 싶다면, [소개](#S-introduction)에 있는 목적과 방법을 참고하기 바란다.
기여자 목록은 [여기](#SS-ack)를 참고하기 바란다.
참고 사항:
* 이하의 규칙들은 완성도, 일관성, 시행 가능성 등에 대해서 아직 철저하게 검증되지 않았다
* (???)로 표시되어 있는 부분은 아직 관련 정보를 기입하지 않았음을 의미한다
* 참조(Reference) 부분은 갱신이 필요하다; C++11 이전의 오래된 소스 코드들이 아직 많이 있다.
* 앞으로 해야 할 일에 대한 최신 목록은 [To-do: 미분류 규칙 초안](./Unclassified.md)에서 확인할 수 있다
[이 가이드의 범위와 구조](#S-abstract)를 확인하거나, 읽고 싶은 부분을 클릭해 해당 내용으로 바로 이동할 수 있다.
* [In: 소개](./Introduction.md)
* [P: 철학](./Philosophy.md)
* [I: 인터페이스](./Interfaces.md)
* [F: 함수](./Functions.md)
* [C: 클래스와 클래스 계층 구조](./Class.md)
* [Enum: 열거형](./Enum.md)
* [R: 리소스 관리](./Resource.md)
* [ES: 표현식과 문장](./Expr.md)
* [Per: 성능](./Performance.md)
* [CP: 동시성과 병렬처리](./Concurrency.md)
* [E: 오류 처리](./Errors.md)
* [Con: 상수와 불변성](./Const.md)
* [T: 템플릿과 제너릭 프로그래밍](./Templates.md)
* [CPL: C 스타일 프로그래밍](./CPL.md)
* [SF: 소스 파일](./Source.md)
* [SL: 표준 라이브러리](./SL.md)
참고할 만한 내용:
* [A: 설계 아이디어](./Architecture.md)
* [NR: 규칙이 아닌 것들과 근거없는 이야기들](./Not.md)
* [RF: 참고 자료들](./References.md)
* [Pro: 프로파일](./Profile.md)
* [GSL: 가이드라인 지원 라이브러리](./GSL.md)
* [NL: 이름과 만듦새 규칙들](./Naming.md)
* [FAQ: 자주 묻는 질문에 대한 대답](./FAQ.md)
* [Appendix A: 라이브러리](./appendix/Libraries.md)
* [Appendix B: 모던 C++ 코드](./appendix/Modernizing.md)
* [Appendix C: 토론](./appendix/Discussion.md)
* [Appendix D: 유용한 도구들](./appendix/Tools.md)
* [용어 해설](./Glossary.md)
* [To-do: 미분류 규칙](./Unclassified.md)
구체적인 언어 기능과 관련된 규칙들:
* assignment
* [regular types](./Class.md#Rc-regular)
* [prefer initialization](./Class.md#Rc-initialize)
* [copy](./Class.md#Rc-copy-semantic)
* [move](./Class.md#Rc-move-semantic)
* [other operations](./Class.md#Rc-matched)
* [default](./Class.md#Rc-eqdefault)
* `class`
* [data](./Class.md#Rc-org)
* [invariant](./Class.md#Rc-struct)
* [members](./Class.md#Rc-member)
* [helpers](./Class.md#Rc-helper)
* [concrete types](./Class.md#SS-concrete)
* [ctors, =, and dtors](./Class.md#S-ctor)
* [hierarchy](./Class.md#SS-hier)
* [operators](./Class.md#SS-overload)
* `concept`:
* [rules](#SS-concepts)
* [in generic programming](#Rt-raise)
* [template arguments](#Rt-concepts)
* [semantics](#Rt-low)
* constructor:
* [invariant](./Class.md#Rc-struct)
* [establish invariant](./Class.md#Rc-ctor)
* [`throw`](./Class.md#Rc-throw)
* [default](./Class.md#Rc-default0)
* [not needed](./Class.md#Rc-default)
* [`explicit`](./Class.md#Rc-explicit)
* [delegating](./Class.md#Rc-delegating)
* [`virtual`](./Class.md#Rc-ctor-virtual)
* derived `class`:
* [when to use](./Class.md#Rh-domain)
* [as interface](./Class.md#Rh-abstract)
* [destructors](./Class.md#Rh-dtor)
* [copy](./Class.md#Rh-copy)
* [getters and setters](./Class.md#Rh-get)
* [multiple inheritance](./Class.md#Rh-mi-interface)
* [overloading](./Class.md#Rh-using)
* [slicing](./Class.md#Rc-copy-virtual)
* [`dynamic_cast`](./Class.md#Rh-dynamic_cast)
* destructor:
* [and constructors](./Class.md#Rc-matched)
* [when needed?](./Class.md#Rc-dtor)
* [may not fail](./Class.md#Rc-dtor-fail)
* exception:
* [errors](#S-errors)
* [`throw`](#Re-throw)
* [for errors only](#Re-errors)
* [`noexcept`](#Re-noexcept)
* [minimize `try`](#Re-catch)
* [what if no exceptions?](#Re-no-throw-codes)
* `for`:
* [range-for and for](#Res-for-range)
* [for and while](#Res-for-while)
* [for-initializer](#Res-for-init)
* [empty body](#Res-empty)
* [loop variable](#Res-loop-counter)
* [loop variable type ???](#Res-???)
* function:
* [naming](#Rf-package)
* [single operation](#Rf-logical)
* [no throw](#Rf-noexcept)
* [arguments](#Rf-smart)
* [argument passing](#Rf-conventional)
* [multiple return values](#Rf-out-multi)
* [pointers](#Rf-return-ptr)
* [lambdas](#Rf-capture-vs-overload)
* `inline`:
* [small functions](#Rf-inline)
* [in headers](#Rs-inline)
* initialization:
* [always](#Res-always)
* [prefer `{}`](#Res-list)
* [lambdas](#Res-lambda-init)
* [in-class initializers](#Rc-in-class-initializer)
* [class members](#Rc-initialize)
* [factory functions](#Rc-factory)
* lambda expression:
* [when to use](#SS-lambdas)
* operator:
* [conventional](#Ro-conventional)
* [avoid conversion operators](./Class.md#Ro-conversion)
* [lambdas](#Ro-lambda)
* `public`, `private`, and `protected`:
* [information hiding](#Rc-private)
* [consistency](#Rh-public)
* [`protected`](#Rh-protected)
* `static_assert`:
* [compile-time checking](#Rp-compile-time)
* [concepts](#Rt-check-class)
* `struct`:
* [for organizing data](#Rc-org)
* [use if no invariant](#Rc-struct)
* [no private members](#Rc-class)
* `template`:
* [abstraction](#Rt-raise)
* [containers](#Rt-cont)
* [concepts](#Rt-concepts)
* `unsigned`:
* [signed](#Res-mix)
* [bit manipulation](#Res-unsigned)
* `virtual`:
* [interfaces](#Ri-abstract)
* [not `virtual`](#Rc-concrete)
* [destructor](#Rc-dtor-virtual)
* [never fail](#Rc-dtor-fail)
규칙들을 설명하는데 사용된 설계 개념들:
* Assertion: ???
* 오류(Error): ???
* 예외(Exception): 예외 보증(Exception Guarantee) (???)
* 실패(Failure): ???
* 불변 조건(invariant): ???
* 누수(Leak): ???
* 라이브러리(Library): ???
* 사전 조건(Precondition): ???
* 사후 조건(Postcondition): ???
* 리소스(Resource): ???
## <a name="S-abstract"></a>요약
이 문서는 C++를 올바르게 사용하기 위한 가이드라인의 모음이며, 개발자들이 모던 C++를 효율적으로 사용할 수 있도록 돕기 위해 작성되었다.
여기서 "모던 C++"는 실제로 사용되고 있는 ISO C++ 표준을 의미한다 (현재는 C++17을 의미하지만, 거의 모든 권장사항들은 C++14와 C++11에도 적용된다). 지금 개발중인 코드가 5년, 또는 10년 후에 어떤 모습이었으면 좋겠는가?
C++ 핵심 가이드라인은 인터페이스, 리소스 관리, 메모리 관리, 동시성와 같이 상대적으로 고수준의 내용에 대한 것이며, 대체로 이런 규칙들은 어플리케이션의 구조나 라이브러리 설계에 영향을 미친다.
가이드라인에 나오는 규칙들을 준수하면 코드가 정적 타입 안정성을 가지도록 할 수 �
没有合适的资源?快使用搜索试试~ 我知道了~
C++ 핵심 가이드라인 한글화 프로젝트 (C++ Core Guidelines).zip
共57个文件
md:36个
pdf:10个
png:4个
需积分: 5 0 下载量 117 浏览量
2023-12-31
10:21:44
上传
评论
收藏 10.96MB ZIP 举报
温馨提示
C++ 핵심 가이드라인 한글화 프로젝트 (C++ Core Guidelines)
资源推荐
资源详情
资源评论
收起资源包目录
C++ 핵심 가이드라인 한글화 프로젝트 (C++ Core Guidelines).zip (57个子文件)
sss
.github
workflows
gh-pages.yml 893B
test-mkdocs.yml 483B
LICENSE 2KB
docs
Introduction to type and resource safety.pdf 635KB
P0122R4.pdf 968KB
ctor-dtor-raii-popl12.pdf 677KB
gsl-intro.md 10KB
Lifetime.pdf 794KB
ReadMe.md 2KB
requirements.txt 99B
talks
Sutter - CppCon 2015 day 2 plenary .pdf 2.37MB
MacIntosh - Static Analysis and C++.pdf 837KB
Contracts-for-Dependable-C++.pdf 666KB
Large-Scale-C++-With-Modules.pdf 2.28MB
Stroustrup - CppCon 2015 keynote.pdf 1.24MB
MacIntosh - A Few Good Types.pdf 862KB
README.md 1KB
sections
Expr.md 125KB
Resource.md 39KB
Introduction.md 18KB
Templates.md 81KB
Const.md 8KB
Philosophy.md 31KB
Not.md 12KB
Enum.md 8KB
Bibliography.md 3KB
appendix
DIscussion.md 28KB
Modernizing.md 4KB
Tools.md 916B
Libraries.md 178B
Source.md 22KB
Naming.md 19KB
References.md 10KB
SL.md 29KB
Performance.md 17KB
Glossary.md 15KB
GSL.md 9KB
Errors.md 38KB
home.md 11B
ReadMe.md 10KB
Functions.md 68KB
images
logo.svg 2KB
param-passing-normal.png 42KB
cpp_core_guidelines_logo_text.png 112KB
param-passing-advanced.png 46KB
Architecture.md 2KB
Unclassified.md 4KB
Profile.md 12KB
index.md 12B
CPL.md 3KB
Class.md 182KB
Concurrency.md 59KB
FAQ.md 9KB
Interfaces.md 48KB
.gitignore 109B
images
cpp_core_guidelines_logo_text.png 112KB
mkdocs.yml 2KB
共 57 条
- 1
资源评论
暮苍梧~
- 粉丝: 41
- 资源: 258
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功