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 typematrix
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 ofA
andB
) and not an unevaluated or partially evaluated object (representing the product ofA
andB
).We therefor need a mechanism to evaluate objects of certain types implicitly and sufficient
control over this mechanism.
Add a Comment
Comments are closed.