Стандарт C++ 11, страница 6

PDF-файл Стандарт C++ 11, страница 6 Практикум (Прикладное программное обеспечение и системы программирования) (37587): Другое - 4 семестрСтандарт C++ 11: Практикум (Прикладное программное обеспечение и системы программирования) - PDF, страница 6 (37587) - СтудИзба2019-05-09СтудИзба

Описание файла

PDF-файл из архива "Стандарт C++ 11", который расположен в категории "". Всё это находится в предмете "практикум (прикладное программное обеспечение и системы программирования)" из 4 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст 6 страницы из PDF

The range of possiblebehaviors is usually delineated by this International Standard. — end note ]1.3.26[defns.well.formed]well-formed programC++ program constructed according to the syntax rules, diagnosable semantic rules, and the One DefinitionRule (3.2).1.4Implementation compliance[intro.compliance]1The set of diagnosable rules consists of all syntactic and semantic rules in this International Standard exceptfor those rules containing an explicit notation that “no diagnostic is required” or which are described asresulting in “undefined behavior.”2Although this International Standard states only requirements on C++ implementations, those requirementsare often easier to understand if they are phrased as requirements on programs, parts of programs, orexecution of programs.

Such requirements have the following meaning:— If a program contains no violations of the rules in this International Standard, a conforming implementation shall, within its resource limits, accept and correctly execute2 that program.— If a program contains a violation of any diagnosable rule or an occurrence of a construct described inthis Standard as “conditionally-supported” when the implementation does not support that construct,a conforming implementation shall issue at least one diagnostic message.— If a program contains a violation of a rule for which no diagnostic is required, this InternationalStandard places no requirement on implementations with respect to that program.3For classes and class templates, the library Clauses specify partial definitions.

Private members (Clause 11)are not specified, but each implementation shall supply them to complete the definitions according to thedescription in the library Clauses.4For functions, function templates, objects, and values, the library Clauses specify declarations. Implementations shall supply definitions consistent with the descriptions in the library Clauses.5The names defined in the library have namespace scope (7.3). A C++ translation unit (2.2) obtains accessto these names by including the appropriate standard library header (16.2).6The templates, classes, functions, and objects in the library have external linkage (3.5). The implementationprovides definitions for standard library entities, as necessary, while combining translation units to form acomplete C++ program (2.2).2) “Correct execution” can include undefined behavior, depending on the data being processed; see 1.3 and 1.9.§ 1.4© ISO/IEC 2011 – All rights reserved5ISO/IEC 14882:2011(E)7Two kinds of implementations are defined: a hosted implementation and a freestanding implementation.

Fora hosted implementation, this International Standard defines the set of available libraries. A freestandingimplementation is one in which execution may take place without the benefit of an operating system, andhas an implementation-defined set of libraries that includes certain language-support libraries (17.6.1.3).8A conforming implementation may have extensions (including additional library functions), provided they donot alter the behavior of any well-formed program. Implementations are required to diagnose programs thatuse such extensions that are ill-formed according to this International Standard. Having done so, however,they can compile and execute such programs.9Each implementation shall include documentation that identifies all conditionally-supported constructs thatit does not support and defines all locale-specific characteristics.31.5Structure of this International Standard[intro.structure]1Clauses 2 through 16 describe the C++ programming language.

That description includes detailed syntacticspecifications in a form described in 1.6. For convenience, Annex A repeats all such syntactic specifications.2Clauses 18 through 30 and Annex D (the library clauses) describe the Standard C++ library. That descriptionincludes detailed descriptions of the templates, classes, functions, constants, and macros that constitute thelibrary, in a form described in Clause 17.3Annex B recommends lower bounds on the capacity of conforming implementations.4Annex C summarizes the evolution of C++ since its first published description, and explains in detail thedifferences between C++ and C.

Certain features of C++ exist solely for compatibility purposes; Annex Ddescribes those features.5Throughout this International Standard, each example is introduced by “[ Example:” and terminated by“ — end example ]”. Each note is introduced by “[ Note:” and terminated by “ — end note ]”. Examples andnotes may be nested.1.61Syntax notation[syntax]In the syntax notation used in this International Standard, syntactic categories are indicated by italic type,and literal words and characters in constant width type. Alternatives are listed on separate lines except ina few cases where a long set of alternatives is marked by the phrase “one of.” If the text of an alternative istoo long to fit on a line, the text is continued on subsequent lines indented from the first one. An optionalterminal or non-terminal symbol is indicated by the subscript “opt ”, so{ expressionopt }indicates an optional expression enclosed in braces.2Names for syntactic categories have generally been chosen according to the following rules:— X-name is a use of an identifier in a context that determines its meaning (e.g., class-name, typedefname).— X-id is an identifier with no context-dependent meaning (e.g., qualified-id).— X-seq is one or more X ’s without intervening delimiters (e.g., declaration-seq is a sequence of declarations).— X-list is one or more X ’s separated by intervening commas (e.g., expression-list is a sequence ofexpressions separated by commas).3) This documentation also defines implementation-defined behavior; see 1.9.§ 1.66© ISO/IEC 2011 – All rights reservedISO/IEC 14882:2011(E)1.7The C++ memory model[intro.memory]1The fundamental storage unit in the C++ memory model is the byte.

A byte is at least large enough to containany member of the basic execution character set (2.3) and the eight-bit code units of the Unicode UTF-8encoding form and is composed of a contiguous sequence of bits, the number of which is implementationdefined. The least significant bit is called the low-order bit; the most significant bit is called the high-orderbit. The memory available to a C++ program consists of one or more sequences of contiguous bytes.

Everybyte has a unique address.2[ Note: The representation of types is described in 3.9. — end note ]3A memory location is either an object of scalar type or a maximal sequence of adjacent bit-fields all havingnon-zero width. [ Note: Various features of the language, such as references and virtual functions, mightinvolve additional memory locations that are not accessible to programs but are managed by the implementation.

— end note ] Two threads of execution (1.10) can update and access separate memory locationswithout interfering with each other.4[ Note: Thus a bit-field and an adjacent non-bit-field are in separate memory locations, and therefore can beconcurrently updated by two threads of execution without interference. The same applies to two bit-fields,if one is declared inside a nested struct declaration and the other is not, or if the two are separated bya zero-length bit-field declaration, or if they are separated by a non-bit-field declaration.

It is not safe toconcurrently update two bit-fields in the same struct if all fields between them are also bit-fields of non-zerowidth. — end note ]5[ Example: A structure declared asstruct {char a;int b:5,c:11,:0,d:8;struct {int ee:8;} e;}contains four separate memory locations: The field a and bit-fields d and e.ee are each separate memorylocations, and can be modified concurrently without interfering with each other. The bit-fields b and ctogether constitute the fourth memory location.

The bit-fields b and c cannot be concurrently modified, butb and a, for example, can be. — end example ]1.81The C++ object model[intro.object]The constructs in a C++ program create, destroy, refer to, access, and manipulate objects. An object is aregion of storage. [ Note: A function is not an object, regardless of whether or not it occupies storage in theway that objects do. — end note ] An object is created by a definition (3.1), by a new-expression (5.3.4) orby the implementation (12.2) when needed. The properties of an object are determined when the object iscreated. An object can have a name (Clause 3).

An object has a storage duration (3.7) which influencesits lifetime (3.8). An object has a type (3.9). The term object type refers to the type with which the objectis created. Some objects are polymorphic (10.3); the implementation generates information associated witheach such object that makes it possible to determine that object’s type during program execution. For otherobjects, the interpretation of the values found therein is determined by the type of the expressions (Clause 5)used to access them.§ 1.8© ISO/IEC 2011 – All rights reserved7ISO/IEC 14882:2011(E)2Objects can contain other objects, called subobjects. A subobject can be a member subobject (9.2), a baseclass subobject (Clause 10), or an array element.

An object that is not a subobject of any other object iscalled a complete object.3For every object x, there is some object called the complete object of x, determined as follows:— If x is a complete object, then x is the complete object of x.— Otherwise, the complete object of x is the complete object of the (unique) object that contains x.4If a complete object, a data member (9.2), or an array element is of class type, its type is considered themost derived class, to distinguish it from the class type of any base class subobject; an object of a mostderived class type or of a non-class type is called a most derived object.5Unless it is a bit-field (9.6), a most derived object shall have a non-zero size and shall occupy one or morebytes of storage.

Base class subobjects may have zero size. An object of trivially copyable or standard-layouttype (3.9) shall occupy contiguous bytes of storage.6Unless an object is a bit-field or a base class subobject of zero size, the address of that object is the address ofthe first byte it occupies. Two objects that are not bit-fields may have the same address if one is a subobjectof the other, or if at least one is a base class subobject of zero size and they are of different types; otherwise,they shall have distinct addresses.4[ Example:static const char test1 = ’x’;static const char test2 = ’x’;const bool b = &test1 != &test2;// always true— end example ]7[ Note: C++ provides a variety of fundamental types and several ways of composing new types from existingtypes (3.9).

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5288
Авторов
на СтудИзбе
417
Средний доход
с одного платного файла
Обучение Подробнее