C++ Template Metaprogramming: Concepts, Tools, and by David Abrahams

By David Abrahams

Abrahams and Gurtovoy have written whatever as regards to a vintage… very good enjoyable to read…
learn the full publication evaluation by Jack J. Woehr, Dr. Dobbs magazine, June 03, 2005

"If you are like me, you are interested in what humans do with template metaprogramming (TMP) yet are annoyed on the loss of transparent suggestions and strong instruments. good, this is often the ebook we now have been expecting. With support from the superb improve Metaprogramming Library, David and Aleksey take TMP from the laboratory to the place of work with readable prose and sensible examples, exhibiting that "compile-time STL" is as capable as its runtime counterpart. Serving as an educational in addition to a guide for specialists, this is often the ebook on C++ template metaprogramming."
—Chuck Allison, Editor, The C++ resource

C++ Template Metaprogramming sheds mild at the strongest idioms of contemporary C++, in the end offering functional metaprogramming instruments and methods into the fingers of the typical programmer.

A metaprogram is a software that generates or manipulates application code. Ever considering that established programming used to be brought to C++, programmers have came upon myriad "template methods" for manipulating courses as they're compiled, successfully taking away the barrier among application and metaprogram. whereas pleasure between C++ specialists approximately those functions has reached the neighborhood at huge, their sensible program continues to be out of achieve for many programmers. This booklet explains what metaprogramming is and the way it's best used. It offers the basis you will want to exploit the template metaprogramming successfully on your personal work.

This e-book is geared toward any programmer who's happy with idioms of the traditional Template Library (STL). C++ power-users will achieve a brand new perception into their current paintings and a brand new fluency within the area of metaprogramming. Intermediate-level programmers who've realized a couple of complex template strategies will see the place those tips slot in the massive photo and may achieve the conceptual starting place to exploit them with self-discipline. Programmers who've stuck the odor of metaprogramming, yet for whom it really is nonetheless mysterious, will eventually achieve a transparent knowing of ways, while, and why it really works. All readers will depart with a brand new instrument of remarkable energy at their disposal—the increase Metaprogramming Library.

The better half CD-ROM comprises all enhance C++ libraries, together with the enhance Metaprogramming Library and its reference documentation, in addition to the entire book's pattern code and vast supplementary material.

Read or Download C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond PDF

Best c & c++ windows programming books

Object-Oriented Programming Under Windows

The expanding acclaim for home windows has remodeled the way in which courses are used and written. home windows calls for programmers to exploit object-orientated programming (OOP) tools. This booklet, for intermediate point or skilled programmers, goals to teach how OOP recommendations should be utilized within the actual international, with specific emphasis on programming below home windows.

Professional Visual Studio 2015

In-depth insurance of the main visible Studio 2015 revamp expert visible Studio 2015 is the major pro's consultant to new and upgraded gains of Microsoft visible Studio. With a different IDE-centric strategy and deep dive into the software's many nooks and crannies, this ebook will carry you in control quick on every little thing visible Studio 2015 has to supply.

Learn Windows PowerShell 3 in a Month of Lunches, 2nd Edition

PowerShell is either a language and an administrative shell with which you could regulate and automate approximately each point of home windows. It accepts and executes instructions instantly, and you'll write scripts to regulate such a lot home windows servers like alternate, IIS, and SharePoint. This e-book is an academic designed for busy directors.

Extra info for C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond

Sample text

To register it. 4 Type Properties The type traits library uses the term properties as a kind of catch-all term for traits other than those directly related to the standard type categories. The simplest traits in this group are is_const and is_volatile, which detect their arguments' cv-qualification. 4. 3. Type Properties Type Property ::type::value and ::value alignment_of A positive multiple of T's memory alignment requirements (the library tries to minimize that multiple). is_empty true iff the compiler optimizes away space for empty base classes andT is an empty class.

Cv and pointers to data members, written as D C::* are identified by is_member_pointer. Note that is_pointer doesn't identify these types, even though they're called pointers. 1 lists the primary type traits. com to register it. 1. Primary Type Categorization Primary Trait ::type::value and ::value is_array true iff T is an array type. is_class TRue iff T is a class type; without compiler support, may also reportTRue for unions. is_enum true iff T is an enumeration type. is_float TRue iff T is a floating-point type.

Com to register it. Thanks 2-7*. One of the nice things about touring the Type Traits library is that we also made a minitour of the C++ runtime type system. Each of the primary type categories, plus the const and volatile qualifiers, is a fundamental building block that can be used in constructing arbitrarily rich types. " Write a short description of the static type system of compile time C++. Hint: a static type system restricts the values that can be passed to particular functions. 2-8*. Describe the effect of making all metadata polymorphic in terms of static and dynamic type checking.

Download PDF sample

Rated 4.17 of 5 – based on 21 votes