C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition by David Abrahams (PDF)

12

 

Ebook Info

  • Published: 2004
  • Number of pages: 408 pages
  • Format: PDF
  • File Size: 2.92 MB
  • Authors: David Abrahams

Description

Abrahams and Gurtovoy have written something close to a classic… marvelous fun to read… Read the complete book reviewby Jack J. Woehr, Dr. Dobbs Journal, June 03, 2005″If you’re like me, you’re excited by what people do with template metaprogramming (TMP) but are frustrated at the lack of clear guidance and powerful tools. Well, this is the book we’ve been waiting for. With help from the excellent Boost Metaprogramming Library, David and Aleksey take TMP from the laboratory to the workplace with readable prose and practical examples, showing that “compile-time STL” is as able as its runtime counterpart. Serving as a tutorial as well as a handbook for experts, this is the book on C++ template metaprogramming.”―Chuck Allison, Editor, The C++ Source C++ Template Metaprogramming sheds light on the most powerful idioms of today’s C++, at long last delivering practical metaprogramming tools and techniques into the hands of the everyday programmer. A metaprogram is a program that generates or manipulates program code. Ever since generic programming was introduced to C++, programmers have discovered myriad “template tricks” for manipulating programs as they are compiled, effectively eliminating the barrier between program and metaprogram. While excitement among C++ experts about these capabilities has reached the community at large, their practical application remains out of reach for most programmers. This book explains what metaprogramming is and how it is best used. It provides the foundation you’ll need to use the template metaprogramming effectively in your own work.This book is aimed at any programmer who is comfortable with idioms of the Standard Template Library (STL). C++ power-users will gain a new insight into their existing work and a new fluency in the domain of metaprogramming. Intermediate-level programmers who have learned a few advanced template techniques will see where these tricks fit in the big picture and will gain the conceptual foundation to use them with discipline. Programmers who have caught the scent of metaprogramming, but for whom it is still mysterious, will finally gain a clear understanding of how, when, and why it works. All readers will leave with a new tool of unprecedented power at their disposal―the Boost Metaprogramming Library.The companion CD-ROM contains all Boost C++ libraries, including the Boost Metaprogramming Library and its reference documentation, along with all of the book’s sample code and extensive supplementary material.

User’s Reviews

Editorial Reviews: From the Back Cover Abrahams and Gurtovoy have written something close to a classic… marvelous fun to read… by Jack J. Woehr, Dr. Dobbs Journal, June 03, 2005″If you’re like me, you’re excited by what people do with template metaprogramming (TMP) but are frustrated at the lack of clear guidance and powerful tools. Well, this is the book we’ve been waiting for. With help from the excellent Boost Metaprogramming Library, David and Aleksey take TMP from the laboratory to the workplace with readable prose and practical examples, showing that “compile-time STL” is as able as its runtime counterpart. Serving as a tutorial as well as a handbook for experts, this is the book on C++ template metaprogramming.”―Chuck Allison, Editor, The C++ Source C++ Template Metaprogramming sheds light on the most powerful idioms of today’s C++, at long last delivering practical metaprogramming tools and techniques into the hands of the everyday programmer. A metaprogram is a program that generates or manipulates program code. Ever since generic programming was introduced to C++, programmers have discovered myriad “template tricks” for manipulating programs as they are compiled, effectively eliminating the barrier between program and metaprogram. While excitement among C++ experts about these capabilities has reached the community at large, their practical application remains out of reach for most programmers. This book explains what metaprogramming is and how it is best used. It provides the foundation you’ll need to use the template metaprogramming effectively in your own work.This book is aimed at any programmer who is comfortable with idioms of the Standard Template Library (STL). C++ power-users will gain a new insight into their existing work and a new fluency in the domain of metaprogramming. Intermediate-level programmers who have learned a few advanced template techniques will see where these tricks fit in the big picture and will gain the conceptual foundation to use them with discipline. Programmers who have caught the scent of metaprogramming, but for whom it is still mysterious, will finally gain a clear understanding of how, when, and why it works. All readers will leave with a new tool of unprecedented power at their disposal―the Boost Metaprogramming Library.The companion CD-ROM contains all Boost C++ libraries, including the Boost Metaprogramming Library and its reference documentation, along with all of the book’s sample code and extensive supplementary material. About the Author David Abrahams is a founding member and moderator of the Boost C++ library development group. Dave has been an ANSI/ISO C++ committee member since 1996, where he is best known for contributing a theory, specification, and implementation of exception handling for the C++ standard library. His company, Boost Consulting, provides Boost-related support and development services and professional training in the art of software construction.Aleksey Gurtovoy is a technical lead for MetaCommunications and a contributing member of the Boost C++ community. Aleksey is the original author of the Boost Metaprogramming Library. He has been working with C++ since 1993, and holds a M.S. degree in computer science from Krasnoyarsk Technical State University, Russia.

Reviews from Amazon users which were colected at the time this book was published on the website:

⭐Abrahams and Gurtovoy address a distinctive and little-known set of C++ features: behaviors of the template mechanism that go far beyond swapping “double” for “float.” In fact, Lisp-like recursion, arithmetic, and list-processing features, all executed at compile time, give the C++ typing subsystem all the power of a Turing machine – but without such nice debugging features.The authors base most of their discussion on the open-source Boost Meta-programming library (MPL), perhaps the most widely known and highly developed usage of this capability. Most of the discussion patiently describes this exotic set of capabilities, giving the reader a clear idea of what the library does and some idea of how the library does it. I came away a bit uncertain about the authors’ purpose, though. I didn’t see enough detail in describing the primitive C++ mechanisms for a reader to go off and use those primitives in new ways – this largely discusses the MPL library elements as black boxes, without a lot of detail about how they work. But, if the intended reader was meant to incorporate an existing library (like MPL) into an application, I didn’t see enough in the way of practical examples or motivation. It’s nice that API elements exist for handling lists like – but why? In what context do such lists arise? What useful work does this tool perform? Or is it just an idea book for an obfuscated C contestant?Unless you’ve mastered the user-unfriendly documentation for Boost MPL or other libraries mentioned here, this really is the only book on the topic. I wish it covered everyday basics a bit better, for example checking that some class in a template parameter is derived from some other class. I look forward to the next reference on the topic, one that goes over internals of the library more thoroughly, or one that gives more examples of practical applications.– wiredweirdFour stars – but that might have been different if there were another book on the topic to compare it to.

⭐I very rarely write reviews, but I feel compelled to do so in this case, becausethis has been so painful.First, this is a really great book if you’re interested in meta-programming.It’s dubious whether meta-programming does a better job than code generation,but if you’re interested in learning it, this is the book. It’s well-written,the explanations are clear, the examples are relevant, and the author certainlyis an authority as a major contributor to the Boost library. Kudos.However, I bought the Kindle edition of this book. While I’ve enjoyed many otherbooks in Kindle format in the past (mainly stories), the transfer job from paperto e-book on this specific book is nothing short of terrible. The code isformatted so large that the lines overflow from one line to the next, making thecode difficult to read (adding to the already difficult nature of MPL code thatis in itself not for the faint of heart), and the page breaks appear to havebeen done carelessly, so I end up having to go back and forth between pages allthe time in order to read the explanations that correspond to the code blocks.It’s impossible to enjoy reading this book on my Kindle. (And this is not thecase with some other e-books about computer topics that I’ve read on thedevice: it’s possible to do a good job at the conversion.)Whoever has done the conversion work to e-book has ruined it. Dave Abrahams’work deserves better. Don’t buy this book in Kindle format, it’s a real waste ofyour money. If you do buy the book, buy the paper edition instead.

⭐This book describes the boost MPL library. Its a very useful guide to this library and it includes enough examples to walk you through how to use it.Secondly the book explains Meta-programming. This is a new concept to a lot of C++ programmers and old hat to LISP programmers. The C++ pre-compiler is constrained to integral types as constraints. But there are a host of tricks you can use within that constraint to build libraries that adapt to their calling structure. Thus generating code that is as efficient as hand written. Of course with your compiler, your milage may vary.The other great thing about using this library, MPL, is that where you would write repeticious template code for every parameter in a template’d library like Tuples, you can automate with it with MPL.Meta programming is a pretty new concept within the C++ community and this book will give us a common language to talk about it. There are other resources on the net, but this book pulls them together.Highly recommended for expert C++ programmers, C++ Library writers and intermediate programmers study’ing to become experts. If you finished Andrei’s book, “Modern C++ Design”, this is a great next book to buy and own.

⭐This is an old book. It also reads like a boost developer’s tutorial. The real value is that so much of what boost proposed is now in the C++ standard. It would be nice if the author would write a new version (Similar to Scott Meyer’s modern c++ book), that explains how to meta program using the new c++11 /14, (and maybe 17) features. How these features relate to the proposed C++ features like contracts, etc…I still recommend this book, even with its shortcomings. Modern C++ uses templates extensively, and the content in this book is still relevant.

⭐Good coverage of C++ template metaprogramming

⭐Nice book about template metaprogramming, the key concepts are in it and it’s essential for beginners to understand what template metaprogramming his.

⭐This does not cover variadic templates which have been available since C++11. The entire book is focussed on using the Boost library so if you just want to understand the C++ template metaprogramming system you will be disappointed.

⭐Like others say, this really is just documentation for the Boost MPL library, although still a good follow up on Modern C++ Design IMO. Modern C++ Design introduces the concepts of typelists in more applied setting, whereas C++ Template Metaprogramming overviews the internals and design decisions of the de-facto metaprogramming library.Overall I rated it 4 stars as although I’m not very fond of the book as it reads more like a reference at times, I do I feel that it is one of the most advanced books out there and the author is clearly competent on the subject

⭐Depuis la “modernisation” du langage C++ avec la sortie du C++11 puis du C++14 (et bientôt le C++17), le language commence à revenir sur le devant de la scène.Développant essentiellement en C# depuis quelques années par commodité, j’ai (re)découvert avec surprise que la nouvelle mouture du C++ n’a plus rien à envier au C#. Pour préserver la compatibilité, les concepteurs ont préféré des évolutions basées sur les templates plutôt que de toucher au coeur du language. Ce livre permet d’en comprendre le fonctionnement en détail.Attention, il ne s’adresse pas aux débutants mais aux initiés possédant déjà une solide expérience du C++ et ayant déjà des notions sur les templates.Le livre est écrit par les fondateurs de la STL et des librairies Boost. Ils y expliquent leurs choix techniques de façon claire et pédagogique. Ce livre m’a permis de comprendre le pourquoi du comment de l’implémentation de containers STL que j’utilise depuis des années sans jamais m’être posé de questions. Pour les passionnés de C++, ce livre se lit comme un roman (j’ai bien dit “les passionnés” ;-).Compré el libro para aprender nuevas técnicas y para tenerlo de consulta. De momento lo que he ido leyendo me ha ayudado bastante. Creo que es un buen libro, aunque tenga ya unis años y las librerías que vienen en el cd estén anticuadas. De todas formas se pueden descargar para tenerlas actulizadas.J’ai toujours été conscient de la puissance des templates en C++, j’étais loin du compte.Ce livre devrait être lu par toute personne touchant de près ou de loin à la programmation.Certes il n’est pas bon pour une première approche des templates en C++, mais une fois lancé, rien ne semble impossible.Non seulement vous saurez comment tirer le meilleur des templates, mais en plus vous saurez comment fonctionne toutes les bibliothèques basées sur cette technique, notamment BOOST.Vous apprendrez entre autre à optimiser l’usage des templates, à nettoyer la trace de debug ou à construire un analyseur syntaxique extensible à la compilation.je le trouve bien fait, tout est clair et précis avec des exemples.

Keywords

Free Download C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition in PDF format
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition PDF Free Download
Download C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition 2004 PDF Free
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition 2004 PDF Free Download
Download C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition PDF
Free Download Ebook C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond 1st Edition

Previous articleModern C++ Design: Generic Programming and Design Patterns Applied 1st Edition by Debbie Lafferty (PDF)
Next articleAdvanced Metaprogramming in Classic C++ by Davide Di Gennaro (PDF)