Effective Modern C++ 英文版

所需积分/C币:18 2017-02-24 10:31:22 4.49MB PDF
收藏 收藏

Effective Modern C++ 英文版 PDF Scott Meyers
Praise for effective Modern c++ So, still interested in C++? You should be! Modern C++(i.e, C++11/C++14) is far more than just a facelift Considering the new features, it seems that it's more a reinvention. Looking for guidelines and assistance Then this book is surely what you are looking for Concerning C++, Scott Meyers was and still is a synonym for accuracy, quality, and delight Gerhard Kreuzer Research and Development Engineer, Siemens AG Finding utmost expertise is hard enough. Finding teaching perfectionism an author's obsession with strategizing and streamlining explanations-is also difficult You know you re in for a treat when you get to find both embodied in the same person Effective Modern C++ is a towering achievement from a consummate technical writer. It layers lucid, meaningful, and well-sequenced clarifications on top of complex and nterconnected topics, all in crisp literary style. You're equally unlikely to find a technical mistake, a dull moment, or a lazy sentence in Effective Modern C++ Andrei alexandrescu Ph. D, Research Scientist, Facebook, and author of Modern C++ design As someone with over two decades of C++ experience, to get the most out of modern C++(both best practices and pitfalls to avoid), I highly recommend getting this book, reading it thoroughly, and referring to it often Ive certainly learned new things going through it Nevin liber Senior Software Engineer, DRW Trading Group Bjarne Stroustrup-the creator of C++-said,C++1l feels like a new language Effective Modern C++ makes us share this same feeling by clearly explaining how everyday programmers can benefit from new features and idioms of C++ll and C++14. Another great Scott Meyers book. Cassio ner FX Quantitative Analyst, Lloyds Banking Group Scott has the knack of boiling technical complexity down to an understandable kernel His Effective C++ books helped to raise the coding style of a previous generation of C++ programmers; the new book seems positioned to do the same for those using modern c++ Roger orr OR/2 Limited, a member of the iso c++ standards committee Effective Modern C++ is a great tool to improve your modern C++ skills. Not only does it teach you how when and where to use modern C++ and be effective, it also explains wh ly Without doubt, Scott's clear and insightful writing, spread over 42 well-thought items, gives programmers a much better understanding of the language -Bart vandewoestyne Research and Development Engineer and C++ enthusiast I love C++, it has been my work vehicle for many decades now. And with the latest raft of features it is even more powerful and expressive than I would have previously imagined. But with all this choice comes the question when and how do i apply these features? As has always been the case, Scott's Effective C++ books are the definitive answer to this question Damien watkins Computation Software Engineering Team Lead, CSIRO Great read for transitioning to modern C++-new C++11/14 language features are described alongside C++98, subject items are easy to reference, and advice summarized at the end of each section Entertaining and useful for both casual and advanced c++ developers Rachel cheng F5 Networks If you're migrating from C++98/03 to C++11/14, you need the eminently practical and clear information Scott provides in Effective Modern C++. If you re already writing C++1l code, you'll probably discover issues with the new features through Scotts thorough discussion of the important new features of the language. Either way, this book is worth your time. Rob stewart Boost Steering Committee member(boost. org) Effective modern ct+ Scott Meye Beng. Cambridge. Farnham·Kn· Sebastopol, Tokyo OREILLY° Effective modern ct+ by Scott Meyers Copyright o 2015 Scott Meyers. All rights reserved Printed in the canada Published by O Reilly Media, InC, 1005 Gravenstein Highway North, Sebastopol, CA 95472 O Reilly books may be purchased for educational, business, or sales promotional use. Online editions are alsoavailableformosttitles(http://safaribooksonline.com).Formoreinformationcontactourcorporate institutionalsalesdepartment800-998-9938orcorporate@oreilly.com Editor: Rachel roumeliotis Proofreader: Charles roumeliotis Production Editor: Melanie Yarbrough Indexer: Scott Meyers Copyeditor: Jasmine Kwityn Interior Designer: David Futato Cover Designer: Ellie Volkhausen Illustrator Rebecca demarest November 2014 First edition Revision history for the first edition 2014-11-07: First Release Seehttp:/oreilly.com/catalog/errata.csp?isbn=9781491903995forreleasedetails The OReilly logo is a registered trademark of O'Reilly Media, Inc. Effective Modern C++, the cover image of a Rose-crowned Fruit Dove, and related trade dress are trademarks of o reilly Media, Inc While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. if any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights 978-1-491-90399-5 For darla black labrador retriever extraordinaire Table of contents From the publisher XI Acknowledgments Introduction 1. Deducing Item 1: Understand template type deduction Item 2: Understand auto type deduction 18 Item 3: Understand decltype 23 Item 4: Know how to view deduced types 2.auto.37 Item 5: Prefer auto to explicit type declarations 37 Item 6 Use the explicitly typed initializer idiom when auto deduces undesired types 43 3. Moving to modern c++......... Item 7: Distinguish between () and i] when creating objects 49 Item 8: Prefer nullptr to o and NULL 58 Item 9: Prefer alias declarations to typedefs Item 10: Prefer scoped enums to unscoped enums 67 Item 11: Prefer deleted functions to private undefined ones Item 12: Declare overriding functions override Item 13 Prefer const iterators to iterators 86 Item 14: Declare functions noexcept if they wont emit exceptions Item 15: Use constexpr whenever possible 97 Item 16 Make const member functions thread safe 103 Item 17: Understand special member function generation 109 4. Smart pointers 117 Item 18: Use std: unique_ptr for exclusive-ownership resource management 118 Item 19: Use std: shared _ptr for shared-ownership resource management. 125 Item 20: Use std: Weak_ptr for std: shared_ptr-like pointers that can dangle 134 Item 21: Prefer std: make unique and std: make shared to direct use of new 139 Item 22: When using the Pimpl Idiom, define special member functions in the implementation file 147 5. Rvalue References, Move Semantics, and Perfect Forwarding. ......... 157 Item 23: Understand std: move and std:: forward 158 Item 24: Distinguish universal references from rvalue references 164 Item 25: Use std:: move on rvalue references std: forward on universal references 168 Item 26: Avoid overloading on universal references 177 Item 27: Familiarize yourself with alternatives to overloading on universal references 184 Item 28: Understand reference collapsing 197 Item 29: Assume that move operations are not present, not cheap, and not used 203 Item 30: Familiarize yourself with perfect forwarding failure cases 207 6. Lambda Expressions. Item 31: Avoid default capture modes 216 Item 32: Use init capture to move objects into closures 224 Item 33: Use decltype on auto&& parameters to std: forward them 229 Item 34: Prefer lambdas to std: bind 232 7. The Concurrency APl............................ 241 Item 35: Prefer task-based programming to thread-based 241 Item 36: Specify std: Launch: async if asynchronicity is essential 245 Item 37: Make std: threads unjoinable on all paths 250 Item 38: Be aware of varying thread handle destructor behavior. 258 Item 3: Consider void futures for one-shot event communication 262 I Table of Contents

试读 127P Effective Modern C++ 英文版
立即下载 低至0.43元/次 身份认证VIP会员低至7折
Effective Modern C++ 英文版 18积分/C币 立即下载
Effective Modern C++ 英文版第1页
Effective Modern C++ 英文版第2页
Effective Modern C++ 英文版第3页
Effective Modern C++ 英文版第4页
Effective Modern C++ 英文版第5页
Effective Modern C++ 英文版第6页
Effective Modern C++ 英文版第7页
Effective Modern C++ 英文版第8页
Effective Modern C++ 英文版第9页
Effective Modern C++ 英文版第10页
Effective Modern C++ 英文版第11页
Effective Modern C++ 英文版第12页
Effective Modern C++ 英文版第13页
Effective Modern C++ 英文版第14页
Effective Modern C++ 英文版第15页
Effective Modern C++ 英文版第16页
Effective Modern C++ 英文版第17页
Effective Modern C++ 英文版第18页
Effective Modern C++ 英文版第19页
Effective Modern C++ 英文版第20页

试读结束, 可继续阅读

18积分/C币 立即下载 >