C++11STl.pdf

5星(超过95%的资源)
所需积分/C币:48 2013-11-11 15:43:42 13.80MB PDF
24
收藏 收藏
举报

c++11下的STL 大致看了下 还不错 又需要可以下载
This page intentionally left blank The c++ Standard library A Tutorial and reference Second edition Nicolai m. josuttis AAddison-Wesley Upper Saddle river,NJ· Boston· Indianapolis· San francisco New York Toronto montreal● London● Munich● Paris· Madrid Capetown· Sydney Tokyo· Singapore· Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals The author and publisher have taken care in the preparation of this book but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and government sales (800)382-3419 corpsales@pearsontechgroup.com For sales outside the united States, please contact International sales international@pearson.com Visit us on the web informit. com/aw Library of Congress Cataloging-in-Publication data Josuttis. Nicolai m The C++ standard library: a tutorial and reference/Nicolai M. Josuttis.---2nd ed cm Includes bibliographical references and index isbn 978-0-321-62321-8(hardcover: alk. paper) 1. C++( Computer program language)I. Title QA76.73C153J692012 005.133-dc23 2011045071 Copyright 2012 Pearson Education, Inc This book was typeset by the author using the ltex document processing system All rights reserved. Printed in the United States of America. This publication is protected by copy- right, and permission must be obtained from the publisher prior to any prohibited reproduction storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical photocopying, recording, or likewise. To obtain permission to use material from this work, please submit a written request to Pearson Education, Inc, Permissions Department, One Lake Street, Upper Saddle river, New Jersey 07458, or you may fax your request to(201)236-3290 ISBN-13:978-0-321-62321-8 ISBN-10 0-321-62321-5 Text printed in the United States on recycled paper at Edwards Brothers in Ann Arbor, Michigan First printing, March 2012 To those who care for people and mankind This page intentionally left blank Contents Preface to the second edition Acknowledgments for the second Edition Preface to the first edition XXV Acknowledgments for the first edition XXVI 1 About This book 1. 1 Why This book 1.2 Before Reading This Book 1.3 Style and Structure of the Book 1. 4 How to read This book 1. 5 State of the art 1.6 Example Code and Additional Information 1.7 Feedback 2245557 2 Introduction to C++ and the Standard library 2.1 History of the C++ Standards 2.1.1 Common Questions about the c++11 Standard 2.1.2 Compatibility between C++98 and C++11 2.2 Complexity and big-O notation 10 3 New Language Features 13 3.1 New C++l1 Language Features 13 3.1.1 Important minor Syntax cleanups 13 3.1.2 Automatic Type Deduction with auto 14 3.1.3 Uniform initialization and initializer lists 15 3.1.4 Range-Based for Loops 17 3.1.5 Move Semantics and Rvalue references 19 Contents 3.1.6 New String literals 23 3.1.7 Keyword noexcept 24 3. 1. 8 Keyword constexpr 26 3. 1.9 New Template Features 26 3.1.10 Lambdas 28 3.1.11 Keyword decltype 3.1.12 New Function Declaration Syntax 3.1.13 Scoped Enumerations 32 3. 1. 14 New Fundamental Data Types 33 3.2 Old"New?" Language features 33 3.2.1 Explicit Initialization for Fundamental Types 37 3.2.2 Definition of main o 37 4 General Concept 4.1 Namespace std 39 4.2 Header files 40 4.3 Error and Exception Handling 41 4.3.1 Standard Exception Classes 41 4.3.2 Members of Exception Classes 44 4.3.3 Passing Exceptions with Class exception_ptr 52 4.3.4 Throwing Standard Exceptions 53 4.3.5 Deriving from Standard Exception Classes 54 4.4 Callable objects 4.5 Concurrency and Multithreading 55 4.6 Allocators 57 5 Utilities 5.1 Pairs and tuples 5.1.1 Pairs... 5.1.2 Tuples 5.1.3 I/O for Tuples 74 5.1.4 Conversions between tuples and pairs 75 5.2 Smart Pointers 76 5.2.1 Class shared_ptr 76 5.2.2 Class weak_ptr 84 5.2. 3 Misusing Shared Pointers 89 5.2. 4 Shared and Weak pointers in detail 2 5.2.5 Class unique_ptr 98 Contents 5.2.6 Class unique ptr in detail .110 5.2.7 Class auto_ptr 113 5.2. 8 Final words on smart pointers 114 5.3 Numeric Limits 115 5. 4 Type Traits and Type Utilities 122 5.4.1 Purpose of Type Traits 122 54.2Ty ype Traits in Detail 125 5.4.3 Reference Wrappers 132 5.4.4 Function Type Wrappers 133 5.5 Auxiliary Functions 134 5.5.1 Processing the minimum and maximum 134 5.5.2 Swapping two values 136 5.5.3 Supplementary comparison operators 138 5.6 Compile-Time Fractional Arithmetic with Class ratio<> .140 5.7 Clocks and Timers ..143 5.7.1 Overview of the Chrono library 143 5.7.2 Durations 144 5.7.3 Clocks and Timepoints 149 5.7.4 Date and Time Functions by C and POsIX 157 5.7.5 Blocking with Timers 160 5.8 Header Files <cstddef>, <cstdlib>, and <cstring> 16l 5.8.1 Definitions in <cstddef> 161 5.8.2 Definitions in <cstdlib> 162 5.8.3 Definitions in <cstring> 163 6 The Standard Template Library 165 6. 1 STL Components 165 6.2 Containers 167 6.2.1 Sequence Containers 169 6.2.2 Associative Containers 177 6.2.3 Unordered Containers 180 6.2.4 Associative arrays .185 6.2.5 Other Containers .187 6.2.6 Container Adapters 188 6.3 Iterators 188 6.3.1 Further Examples of Using Associative and Unordered Containers 193 6.3.2 Iterator Categories ..198

...展开详情
试读 127P C++11STl.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
denphon 很好的资料,很齐全,谢谢.
2018-05-22
回复
weili2512 好资源,就是积分有点高。
2017-10-11
回复
irwin_chen 好书, 第一版买了, 这版先看看, 有纸的可以再入一本当手册~
2015-01-28
回复
toddyce 很不错。。就是页数太多了。。慢慢读啊!多谢!
2014-09-04
回复
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
C++11STl.pdf 48积分/C币 立即下载
1/127
C++11STl.pdf第1页
C++11STl.pdf第2页
C++11STl.pdf第3页
C++11STl.pdf第4页
C++11STl.pdf第5页
C++11STl.pdf第6页
C++11STl.pdf第7页
C++11STl.pdf第8页
C++11STl.pdf第9页
C++11STl.pdf第10页
C++11STl.pdf第11页
C++11STl.pdf第12页
C++11STl.pdf第13页
C++11STl.pdf第14页
C++11STl.pdf第15页
C++11STl.pdf第16页
C++11STl.pdf第17页
C++11STl.pdf第18页
C++11STl.pdf第19页
C++11STl.pdf第20页

试读结束, 可继续阅读

48积分/C币 立即下载 >