C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources] - نسخه متنی

Herb Sutter, Andrei Alexandrescu

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Examples


Example:

vector

for small lists.
Is it a common fallacy to use

list just because "

list is obviously the right type for list operations," such as insertion into the middle of a sequence. Using a

vector for small lists is almost always superior to using

list . Even though insertion in the middle of the sequence is a linear-time operation for

vector and a constant-time operation for

list, vector usually outperforms

list when containers are relatively small because of its better constant factor, and

list 's Big-Oh advantage doesn't kick in until data sizes get larger.Item 7), or because the strong safety guarantee is essential and the contained type's copy constructor or copy assignment operator might fail (in which case, it can be important that

list provides the strong guarantee for

insert operations for collections of such types).


/ 521