C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources] نسخه متنی
لطفا منتظر باشید ...
صفحه اصلی تبیان
شبکه اجتماعی
مشاوره
آموزش
فیلم
صوت
تصاویر
حوزه
کتابخانه
دانلود
وبلاگ
فروشگاه اینترنتی
ورود
✕
فارسی
کردی
العربیه
اردو
Türkçe
Русский
English
Français
✕
کانال فیلم من
تبیان من
فایلهای من
کتابخانه من
پنل پیامکی
وبلاگ من
اینجــــا یک کتابخانه دیجیتالی است
با بیش از
100000
منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی
جستجو بر اساس ...
همه
عنوان
پدیدآور
موضوع
یادداشت
تمام متن
اصطلاحنامه
مجموعه ها
مرورالفبایی
لغت نامه دهخدا
➟
جستجو در لغت نامه
بیشتر
کتابخانه شخصی
پرسش از کتابدار
ارسال منبع
C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources] - نسخه متنی
Herb Sutter, Andrei Alexandrescu
|
نمايش فراداده
،
افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
میخواهم بخوانم
درحال خواندن
خوانده شده
ارسال به دوستان
آدرس پست الکترونیک گیرنده :
آدرس پست الکترونیک فرستنده :
نام و نام خانوارگی فرستنده :
پیغام برای گیرنده ( حداکثر 250 حرف ) :
کد امنیتی را وارد نمایید
ارسال
جستجو در متن کتاب
بیشتر
تنظیمات قلم
فونت
پیش فرض
تیتر
کودک
میترا
نازنین
اندازه قلم
+
-
پیش فرض
حالت نمایش
روز
نیمروز
شب
➟
جستجو در لغت نامه
بیشتر
لیست موضوعات
Summary
Discussion
References
Chapter 26. Preserve natural semantics for overloaded operators
Summary
Discussion
Exceptions
References
None 27. Prefer the canonical forms of arithmetic and assignment operators
Summary
Discussion
Examples
Exceptions
References
Chapter 28. Prefer the canonical form of ++ and --. Prefer calling the prefix forms
Summary
Discussion
Exceptions
References
Chapter 29. Consider overloading to avoid implicit type conversions
Summary
Discussion
References
Chapter 30. Avoid overloading &&, ||, or , (comma)
Summary
Discussion
Examples
Exceptions
References
Chapter 31. Don't write code that depends on the order of evaluation of function arguments
Summary
Discussion
References
Class Design and Inheritance
Chapter 32. Be clear what kind of class you're writing
Summary
Discussion
References
Chapter 33. Prefer minimal classes to monolithic classes
Summary
Discussion
References
Chapter 34. Prefer composition to inheritance
Summary
Discussion
Exceptions
References
Chapter 35. Avoid inheriting from classes that were not designed to be base classes
Summary
Discussion
Examples
References
Chapter 36. Prefer providing abstract interfaces
Summary
Discussion
Examples
Exceptions
References
Chapter 37. Public inheritance is substitutability. Inherit, not to reuse, but to be reused
Summary
Discussion
Exceptions
References
Chapter 38. Practice safe overriding
Summary
Discussion
Examples
References
Chapter 39. Consider making virtual functions nonpublic, and public functions nonvirtual
Summary
Discussion
Exceptions
References
Chapter 40. Avoid providing implicit conversions
Summary
Discussion
Examples
Exceptions
References
Chapter 41. Make data members private, except in behaviorless aggregates (C-style structs)
Summary
Discussion
Examples
Exceptions
References
Chapter 42. Don't give away your internals
Summary
Discussion
Exceptions
References
Chapter 43. Pimpl judiciously
Summary
Discussion
Exceptions
References
Chapter 44. Prefer writing nonmember nonfriend functions
Summary
Discussion
Examples
References
Chapter 45. Always provide new and delete together
Summary
Discussion
Exceptions
References
Chapter 46. If you provide any class-specific new, provide all of the standard forms (plain, in-place, and nothrow)
Summary
Discussion
References
Construction, Destruction, and Copying
Chapter 47. Define and initialize member variables in the same order
Summary
Discussion
References
Chapter 48. Prefer initialization to assignment in constructors
Summary
Discussion
Exceptions
References
Chapter 49. Avoid calling virtual functions in constructors and destructors
Summary
Discussion
Examples
References
Chapter 50. Make base class destructors public and virtual, or protected and nonvirtual
Summary
Discussion
Examples
Exceptions
References
Chapter 51. Destructors, deallocation, and swap never fail
Summary
Discussion
References
Chapter 52. Copy and destroy consistently
Summary
Discussion
Exceptions
References
Chapter 53. Explicitly enable or disable copying
Summary
Discussion
References
Chapter 54. Avoid slicing. Consider Clone instead of copying in base classes
Summary
Discussion
Exceptions
References
Chapter 55. Prefer the canonical form of assignment
Summary
Discussion
References
Chapter 56. Whenever it makes sense, provide a no-fail swap (and provide it correctly)
Summary
Discussion
Exceptions
References
Namespaces and Modules
Chapter 57. Keep a type and its nonmember function interface in the same namespace
Summary
Discussion
Examples
References
Chapter 58. Keep types and functions in separate namespaces unless they're specifically intended to work together
Summary
Discussion
References
Chapter 59. Don't write namespace usings in a header file or before an #include
Summary
Discussion
Exceptions
References
Chapter 60. Avoid allocating and deallocating memory in different modules
Summary
Discussion
References
Chapter 61. Don't define entities with linkage in a header file
Summary
Discussion
Exceptions
References
Chapter 62. Don't allow exceptions to propagate across module boundaries
Summary
Discussion
References
Chapter 63. Use sufficiently portable types in a module's interface
Summary
Discussion
Examples
References
Templates and Genericity
Chapter 64. Blend static and dynamic polymorphism judiciously
Summary
Discussion
References
Chapter 65. Customize intentionally and explicitly
Summary
Discussion
References
Chapter 66. Don't specialize function templates
Summary
Discussion
Examples
References
Chapter 67. Don't write unintentionally nongeneric code
Summary
Discussion
Exceptions
References
Error Handling and Exceptions
Chapter 68. Assert liberally to document internal assumptions and invariants
Summary
Discussion
Examples
References
Chapter 69. Establish a rational error handling policy, and follow it strictly
Summary
Discussion
References
Chapter 70. Distinguish between errors and non-errors
Summary
Discussion
Examples
References
Chapter 71. Design and write error-safe code
Summary
Discussion
Examples
References
Chapter 72. Prefer to use exceptions to report errors
Summary
Discussion
Examples
Exceptions
References
Chapter 73. Throw by value, catch by reference
Summary
Discussion
Examples
References
Chapter 74. Report, handle, and translate errors appropriately
Summary
Discussion
Exceptions
References
Chapter 75. Avoid exception specifications
Summary
Discussion
Exceptions
References
STL: Containers
Chapter 76. Use vector by default. Otherwise, choose an appropriate container
Summary
Discussion
Examples
References
Chapter 77. Use vector and string instead of arrays
Summary
Discussion
References
_str) to exchange data with non-C++ APIs
Summary
Discussion
References
Chapter 79. Store only values and smart pointers in containers
Summary
Discussion
Examples
References
Chapter 80. Prefer push_back to other ways of expanding a sequence
Summary
Discussion
Exceptions
References
Chapter 81. Prefer range operations to single-element operations
Summary
Discussion
Examples
References
Chapter 82. Use the accepted idioms to really shrink capacity and really erase elements
Summary
Discussion
Exceptions
References
STL: Algorithms
Chapter 83. Use a checked STL implementation
Summary
Discussion
Examples
References
Chapter 84. Prefer algorithm calls to handwritten loops
Summary
Discussion
Examples
Exceptions
References
Chapter 85. Use the right STL search algorithm
Summary
Discussion
References
Chapter 86. Use the right STL sort algorithm
Summary
Discussion
Examples
Exceptions
References
Chapter 87. Make predicates pure functions
Summary
Discussion
Examples
References
Chapter 88. Prefer function objects over functions as algorithm and comparer arguments
Summary
Discussion
References
Chapter 89. Write function objects correctly
Summary
Discussion
References
Type Safety
Chapter 90. Avoid type switching; prefer polymorphism
Summary
Discussion
Examples
References
Chapter 91. Rely on types, not on representations
Summary
Discussion
References
Chapter 92. Avoid using reinterpret_cast
Summary
Discussion
Exceptions
References
Chapter 93. Avoid using static_cast on pointers
Summary
Discussion
References
Chapter 94. Avoid casting away const
Summary
Discussion
Exceptions
References
Chapter 95. Don't use C-style casts
Summary
Discussion
References
Chapter 96. Don't memcpy or memcmp non-PODs
Summary
Discussion
References
Chapter 97. Don't use unions to reinterpret representation
Summary
Discussion
Exceptions
References
Chapter 98. Don't use varargs (ellipsis)
Summary
Discussion
References
Chapter 99. Don't use invalid objects. Don't use unsafe functions
Summary
Discussion
References
Chapter 100. Don't treat arrays polymorphically
Summary
Discussion
References
Bibliography
Summary of Summaries
Organizational and Policy Issues
Design Style
Coding Style
Functions and Operators
Class Design and Inheritance
Construction, Destruction, and Copying
Namespaces and Modules
Templates and Genericity
Error Handling and Exceptions
STL: Containers
STL: Algorithms
Type Safety
توضیحات
افزودن یادداشت جدید
References
[
C++03
] §17.4.3.1(1) •
[
Stroustrup00
] §E.3.3 •
[
Sutter00
] §12-13, §41