LoginSignup
0
0

Effective C++ Third version, sample code compile list(まとめ)作成中

Last updated at Posted at 2018-06-22

Effective C++: 55 Specific Ways to Improve Your Programs and DesignsThird version by Scott Mayers
https://www.informit.com/store/effective-c-plus-plus-55-specific-ways-to-improve-your-9780321334879
https://www.amazon.com/dp/0321334876
Sample code from
Yuzhen11/Effective_CPP
https://github.com/Yuzhen11/Effective_CPP

<この項は書きかけです。順次追記します。>

目的(purpose)

"Effective C++コンパイル記録は、コンパイラおよび対応標準により、コンパイルエラーMessageの違いを記録し、どのエラーが出たら、どの対応標準にすればエラーが少なくなるかを考察するための資料の第一歩です。
上記参照サイトにはコンパイルする仕組みを提供していない。簡易な台本(script)を作成する。

成果(outcome)

日本語で解説を書かれている方の記事を先頭に、
そのソースをコンパイルした例を1章ごとに引用し、
処理系、標準、技能の関係を確認しやすくする。

計画(plan)

(1)コンパイラの種類、対応標準の違いによってエラーの数が違う。
(2)同じエラー、警告であってもMessageの表現が違う。
(3) エラー、警告のMessageをネットで検索する際に役立てる。
(4)コード断片の役に立つまたは意味のあるコンパイル・リンク・実行エラーの取り方を検討する
(5)コード断片の役に立つまたは意味のある出力を検討する

結果(result)現在整理中

  1. コンパイラによるエラー、渓谷の違い
  2. コンパイラによる必要なヘッダファイルの違い
  3. 参考にした資料

Ch1: Accustoming yourself to C++

Effective C++(項1〜5)解説

(1)View C++ as a federation languages.
https://qiita.com/kaizen_nagoya/items/67eadd8fe989d4a92906

(2)Prefer consts, enums, and inlines to #defines.
https://qiita.com/kaizen_nagoya/items/be07d78720b2e50896cf

(3)Use const whenever possible.
https://qiita.com/kaizen_nagoya/items/60134c88e332702df4e3

(4)Make sure that objects are initialized before they're used.
https://qiita.com/kaizen_nagoya/items/1a3a621749a48ff98da3

(5)Know what functions C++ silently writes and calls
https://qiita.com/kaizen_nagoya/items/09be7d8b1a2942586814

#Ch2: Constrcutors, Destructors, and Assignment Operators

###Effective C++(項6〜10)解説
https://qiita.com/MoriokaReimen/items/bf301530e8f5d6d2fe90

(6) Explicitly disallow the use of compiler generated functions you do not want.
https://qiita.com/kaizen_nagoya/items/398056541c6777221397

(7) Declare destructors virtual in polymorphic base classes
https://qiita.com/kaizen_nagoya/items/299c46e31925fb61837a

(8) Prevent exceptions from leaving your destructors
https://qiita.com/kaizen_nagoya/items/df38e3be377eed659376

(9) Never call virtual functions during construcion or destruction
https://qiita.com/kaizen_nagoya/items/453270fb237d9d2344ca

(10) unctions during construcion or destruction
https://qiita.com/kaizen_nagoya/items/f7a66712b5b42b4048b2

Effective C++(項11〜15)解説

(11) Handle assignment to self in operator=
https://qiita.com/kaizen_nagoya/items/3188c116010e80959b86

(12)Copy all parts of an object
https://qiita.com/kaizen_nagoya/items/39b5a246b9b5139cdc6d

(13)Use objects to manage resources
https://qiita.com/kaizen_nagoya/items/3435211de1537f8008d4

(14)Think carefully about copying behavior in resource-managing classes
https://qiita.com/kaizen_nagoya/items/156495bf758d9c9c55f1

(15) Provide access to raw resources in resource-managin classes
https://qiita.com/kaizen_nagoya/items/70800bcd3dc80810bc74

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文書履歴

ver. 0.10 初稿 20180623
ver. 0.11 (8)まで 20180624
ver. 0.12 (15)まで 20180625
ver. 0.13 ありがとう追記 20230413

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0