New adopted paper: N3655 (excluding part 4), TransformatinTraits Redux, v2 -- Walter Brown

Save to:
Instapaper Pocket Readability

Note: This paper was adopted into draft C++14 on Saturday at the Bristol UK ISO C++ meeting.

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: N3655

Date: 2013-04-18

TransformationTraits Redux, v2

by Walter Brown

NOTE: Section 4 was not adopted.

Excerpt:

... We therefore propose to add a set of template aliases for the library’s TransformationTraits in order to reduce the programmer burden of expressing this far more common case. Note, in the following rewrite of the above example, the absence of any typename keyword, as well as the absence of any ::type suffix, thus condensing the statement from 3 to 2 lines of code:


template< class T > using reference_t
  = conditional_t< is_reference<T>::value, T, add_lvalue_reference_t<T> >;

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.