Pizer’s Weblog

programming, DSP, math

Archive for January 2009

C++0x: concepts & rvalue references — 2nd round

with 4 comments

Last update: 2009-02-1

Concepts and rvalue references are two new features that are going to be included in the next official version of the C++ language with high probability. I’m not going to mention the basics behind those two features because it has been done before in other articles. Try this google video or this article for an introduction to concepts by Doug Gregor and this article for an introduction to rvalue references by Howard Hinnant et al.

I already wrote a post on concepts and rvalue references here which discussed some problems when concepts are combined with rvalue references. It turned out that David Abrahams and Doug Gregor were also aware of the first issue I addressed. They published an article one day before I wrote about it. In this post I’m going to address other arguments (consistency and intuitivity) for why I think their proposed resolution is a good idea and what other language modification can increase consistency. Before I go into the last bit I will shed some light on what function requirements actually mean and how they can be satisfied.

Update 2009-02-1:[ It turns out you can’t exprapolate the meaning of function requirements from the concept_map checking rules because they don’t cover all use cases in constrained contexts (see hole in concepts system). So, keep this in mind while reading the rest of this article.]

Read the rest of this entry »


Written by pizer

January 8, 2009 at 7:04 pm