isocpp / isocpp/CppCoreGuidelines

updating the Concepts guidelines to reflect C++20 standard?

Open
#1,547 3 comments 0 reactions 1 assignee View on GitHub

@cubbimew is already working on this.

Since Sep 3, 2020.

Dominant language
CSS
Stars
45.3k
Forks
5.6k
PR merge metrics
No merged PRs in 30d

Description

May I ask a clarifying question regarding the items in Section T (Templates + Concepts), such as T.13: Prefer the shorthand notation for simple, single-type argument concepts. Is it correct that these examples reflect the proposed syntax in the Concepts TS, which however slightly differs from the syntax ultimately adopted for C++20? For instance, where the Concepts TS allows a short-hand syntax void sort(Sortable &), C++20 will demand void sort(Sortable auto &) to keep the syntactic distinction between the non-template function sort that accepts type Sortable vs. the constrained template function that constrains the type with which it may be instantiated using the Sortable concept. This is based on reading that P1141r1 reflects what was (will be?) accepted into C++20.

If my understanding is correct, then should we expect future updates/clarifications regarding the relationship between the Concepts TS and C++20 Concepts, or perhaps an update to reflect C++20 concepts?

I did read FAQ 9 which makes it clear that the guidelines reflect C++14 + Concepts TS. Still, readers may read section T out of context when trying to learn concepts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.