N4074: Let return{expr} Be Explicit, Revision 2 -- Herb 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: N4074

Date: 2014-07-02

Let return{expr} Be Explicit, Revision 2

by Herb Sutter


This paper is a followup to N4029 to follow EWG preference for a variation on that proposal, namely allowing explicit constructors to be called by the syntax return {expr};, with the same semantics as initializing a local variable using return_type var{expr};. This addresses EWG issue #114.

Thanks to Richard Smith for his assistance with the proposed wording. Thanks to Peter Dimov, Gabriel Dos Reis, Howard Hinnant, Stephan T. Lavavej, Mike Miller, Bjarne Stroustrup, Ville Voutilainen, Jona-than Wakely and all others who provided comments on this topic and/or drafts of this paper.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.