Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 642 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
642
Dung lượng
4,58 MB
Nội dung
[...]... dyne-book 12 The C++ Standard Library Chapter 2 Introduction to C++ and the Standard Library 2.1 History The standardization of C++ was started in 1989 and finished at the end of 1997, although some formal motions delayed the final publication until September 1998 The result was a reference manual with approximately 750 pages, published by the International Standards Organization (ISO) The standard has the. .. how useful the extension would be Thus, hash tables are not part of the standard, although they should be a part of the STL as a common data structure The current standard is not the end of the road There will be fixes of bugs and inconsistencies, and there likely will be a next version of the standard in five years or so However for the next few years, C++ programmers have a standard and the chance... from the language or the library are derived from the base class exception This class is the root of several standard exception classes that form a hierarchy, as shown in Figure 3.1 These standard exception classes can be divided into three groups: Figure 3.1 Hierarchy of Standard Exceptions dyne-book 29 The C++ Standard Library 1 Exceptions for language support 2 Exceptions for the C++ standard library. .. to the people who work on developing standards So, if a participant doesn't work for a company that has a special interest in the standard, the work is done for fun Thank goodness there were a lot of dedicated people who had the time and the money to do just that The C++ standard was not developed from scratch It was based on the language as described by Bjarne Stroustrup, the creator of C++ The standard. .. introduction to the STL in Chapter 5 If you are a C++ programmer who wants to know, in general, the concepts and all parts of the library, you could simply read the book from the beginning to the end However, you should skip the reference sections To program with certain components of the C++ standard library, the best way to find something is to use the index I have tried to make the index very comprehensive... 2.2 New Language Features The core language and the library of C++ were standardized in parallel In this way, the library could benefit from improvements in the language and the language could benefit from experiences of library implementation In fact, during the standardization process the library often used special language features that were not yet available C++ is not the same language it was five... subsections describe the most important new language features that are relevant for the C++ standard library 2.2.1 Templates Almost all parts of the library are written as templates Without template support, you can't use the standard library Moreover, the library needed new special template features, which I introduce after a short overview of templates dyne-book 14 The C++ Standard Library Templates... regarding the C++ standard library The individual components of the C++ standard library are independent of each other, to some extent, so after reading Chapters 2 through 4 you could read the chapters that discuss the individual components in any order Bear in mind, that Chapter 5 through Chapter 9 all describe the same component To understand the other STL chapters, you should start with the introduction... destroyed.[2] [2] The specification of the lifetime of the return value of what() is not specified in the original standard However, this is the proposed resolution to fix this problem dyne-book 32 The C++ Standard Library The remaining members of the standard exception classes create, copy, assign, and destroy exception objects Note that besides what() there is no additional member for any of the standard. .. my experience, the best way to learn something new is to look at examples Therefore, you'll find a lot of examples throughout the book They may be a few lines of code or complete programs In the latter case, you'll find the name of the file containing the program as the first dyne-book 11 The C++ Standard Library comment line You can find the http://www.josuttis.com/libbook/ files on the Internet at . thanks. The C++ Standard Library dyne-book 13 Chapter 2. Introduction to C++ and the Standard Library 2.1 History The standardization of C++ was started in 1989 and finished at the end of. regarding the C++ standard library. The individual components of the C++ standard library are independent of each other, to some extent, so after reading Chapters 2 through 4 you could read the chapters. described in the book (the minor The C++ Standard Library dyne-book 9 details about the language are more important for people who want to implement the library rather than use it). Note that the