C++ Books

Wednesday, February 21, 2007

Concepts: Extending C++ Templates For Generic Programming

by Doug Gregor

Concepts are a major addition to C++0x that make templates more robust, more powerful, ... all » and easier to write and use. At their most basic level, concepts provide a type system for templates. Using concepts, the C++ compiler is able to detect errors in the definition and use of templates before they are instantiated. One immediately obvious benefit of this separate type-checking capability is a dramatic improvement in error messages resulting from improper use of templates. Look a little deeper and we find that concepts support an entirely new programming paradigm, Generic Programming, enabling the construction of a new breed of generic libraries that provide better extensibility, composability, and usability than what is possible with today's C++.

This talk will provide an overview of the new features introduced by concepts and how they will benefit C++ programmers. We will see how concepts can be used to express the core components of the C++ Standard (Template) Library, and explore some of the new capabilities that concepts bring to the C++ language.



Source: Google Tech Talks

C++0x Initialization Lists

by Bjarne Stroustrup

Getting initialization right is an important part of programming. Over the years, this ... all » has led to a mess of language facilities and techniques. This talk describes how C++0x (most likely) will address two issues: how to get a uniform syntax and semantics for all initialization and how to allow initialization by general lists. Obviously, people will want the solution to be really simple and completely compatible. As ever, the resolution is to be almost completely compatible and almost simple. This talk will describe sequence constructors, homogeneous and heterogeneous initializer lists, and (as far as time allows) fit generalized constant expressions, prevention of narrowing conversions, and variadic templates into this picture.



Source: Google Tech Talks