Template Metaprogramming with C++

Template Metaprogramming with C++
Author :
Publisher : Packt Publishing Ltd
Total Pages : 480
Release :
ISBN-10 : 9781803230535
ISBN-13 : 1803230533
Rating : 4/5 (35 Downloads)

Book Synopsis Template Metaprogramming with C++ by : Marius Bancila

Download or read book Template Metaprogramming with C++ written by Marius Bancila and published by Packt Publishing Ltd. This book was released on 2022-08-19 with total page 480 pages. Available in PDF, EPUB and Kindle. Book excerpt: Understand how to use modern C++ templates for writing maintainable, robust, and fast software Key Features • Grasp the fundamentals of and learn to write effective C++ templates • Get up to speed with the latest C++20 template features such as constraints and concepts • Explore different patterns and idioms to integrate templates in your program design Book Description Learn how the metaprogramming technique enables you to create data structures and functions that allow computation to happen at compile time. With this book, you'll realize how templates help you avoid writing duplicate code and are key to creating generic libraries, such as the standard library or Boost, that can be used in a multitude of programs. The introductory chapters of this book will give you insights into the fundamentals of templates and metaprogramming. You'll then move on to practice writing complex templates and exploring advanced concepts such as template recursion, template argument deduction, forwarding references, type traits, and conditional compilation. Along the way, you'll learn how to write variadic templates and how to provide requirements to the template arguments with C++20 constraints and concepts. Finally, you'll apply your knowledge of C++ metaprogramming templates to implement various metaprogramming patterns and techniques. By the end of this book, you'll have learned how to write effective templates and implement metaprogramming in your everyday programming journey. What you will learn • Understand the syntax for all types of templates • Discover how specialization and instantiation works • Get to grips with template argument deduction and forwarding references • Write variadic templates with ease • Become familiar with type traits and conditional compilation • Restrict template arguments in C++20 with constraints and concepts • Implement patterns such as CRTP, mixins, and tag dispatching Who this book is for This book is for beginner-to-intermediate C++ developers who want to learn about template metaprogramming as well as advanced C++ developers looking to get up to speed with the new C++20 features related to templates and the the various idioms and patterns. Basic C++ coding experience is necessary to get started with this book.


Template Metaprogramming with C++ Related Books

Template Metaprogramming with C++
Language: en
Pages: 480
Authors: Marius Bancila
Categories: Computers
Type: BOOK - Published: 2022-08-19 - Publisher: Packt Publishing Ltd

DOWNLOAD EBOOK

Understand how to use modern C++ templates for writing maintainable, robust, and fast software Key Features • Grasp the fundamentals of and learn to write eff
C++ Template Metaprogramming
Language: en
Pages: 724
Authors: David Abrahams
Categories: Computers
Type: BOOK - Published: 2004-12-10 - Publisher: Pearson Education

DOWNLOAD EBOOK

C++ Template Metaprogramming sheds light on the most powerful idioms of today's C++, at long last delivering practical metaprogramming tools and techniques into
C++ Template Metaprogramming in Practice
Language: en
Pages: 308
Authors: Li Wei
Categories: Computers
Type: BOOK - Published: 2020-12-01 - Publisher: CRC Press

DOWNLOAD EBOOK

Using the implementation of a deep learning framework as an example, C++ Template Metaprogramming in Practice: A Deep Learning Framework explains the applicatio
Notebook C++
Language: en
Pages: 103
Authors: Andreas Fertig
Categories: Computers
Type: BOOK - Published: 2020-01-20 - Publisher: Fertig Publications

DOWNLOAD EBOOK

This book is part of a series which is called Notebook C++. The idea is that most of us have some kind of rules about do's and don'ts or tips and tricks to keep
Advanced Metaprogramming in Classic C++
Language: en
Pages: 554
Authors: Davide Di Gennaro
Categories: Computers
Type: BOOK - Published: 2015-05-08 - Publisher: Apress

DOWNLOAD EBOOK

Advanced Metaprogramming in Classic C++ aims to be both an introduction and a reference to C++ template metaprogramming (TMP); TMP is presented in the book as a