N3929: Technical Specification: Concepts -- Andrew Sutton

Note: This paper was approved on Saturday at the Issaquah WA USA ISO C++ meeting to be turned into a Concepts Technical Specification working draft for expected adoption at our next meeting (June in Rapperswil, Switzerland).

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

Date: 2014-02-14

Technical Specification: Concepts

by Andrew Sutton

Excerpt:

C++ has long provided language support for generic programming in the form of templates. However, these templates are unconstrained, allowing any type or value to be substituted for a template argument, often resulting in compiler errors. What is lacking is a specification of an interface for a template, separate from its implementation, so that a use of a template can be selected among alternative templates and checked in isolation.

Add a Comment

Comments are closed.

Comments (3)

0 0

Haitham Gad said on Feb 17, 2014 07:04 PM:

Does this mean that we're going to see Concepts in C++14 or is it something for the next major version of the standard?
2 0

Herb Sutter said on Feb 18, 2014 10:32 AM:

@Haitham: Concepts is a separate spec shipping around the same timeframe as C++14. See the trip report at http://isocpp.org/blog/2014/02/trip-report -- we're looking forward to hopefully sending it out for ballot in June.
1 0

matt said on Feb 18, 2014 03:20 PM:

Out of curiosity -- does anyone know the story/reason behind changing the naming conventions compared to (SGI) STL?

Reference:
https://www.sgi.com/tech/stl/table_of_contents.html

These are already quite established and well-known in the C++ community -- see, e.g., Boost C++ Libraries documentation: http://www.boost.org/community/generic_programming.html
// Or: http://en.cppreference.com/w/cpp/concept

For instance, consider the `copy` algorithm documentation, referring to `InputIterator` and `OutputIterator`:
https://www.sgi.com/tech/stl/copy.html

I understand these will now be called `Input_iterator` and `Output_iterator` -- is this correct? Why?