New paper: N3748, Implicit Evaluation of auto Variables and Arguments -- Gottschling, Falcou, Sutter

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3748

Date: 2013-08-30

Implicit Evaluation of "auto" Variables and Arguments

by Peter Gottschling, Joel Falcou, Herb Sutter

Excerpt:

Type detection for variables from expressions' return type:

auto x= expr;

has proven high usability. However, it fails to meet most users' expectations and preferences when
proxies or expression templates (ET) are involved, e.g.:

matrix A, B;
// setup A and B
auto C= A  B;

Many people would expect C to be of type matrix as well. ...

Moreover, we assume that even people who are aware of expression templates will very often prefer the evaluated object (here a matrix containing the product of A and B) and not an unevaluated or partially evaluated object (representing the product of A and B).

We therefor need a mechanism to evaluate objects of certain types implicitly and sufficient
control over this mechanism.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.