https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88075

            Bug ID: 88075
           Summary: [feature-request] allow "concept" instead of "concept
                    bool" with -fconcepts
           Product: gcc
           Version: 7.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: h2+bugs at fsfe dot org
  Target Milestone: ---

Concepts in C++20 are happening and the overlap with the concepts TS is very
significant which opens the possibility to write code in a dialect that is
accepted by both `-std=c++17 -fconcepts` and `-std=c++2a`. This is a huge bonus
for GCC over other implementations, because many long-term supported operating
systems ship GCC7 and won't pick up new compilers with full c++20 support for a
long time.

The only thing that prevents using the common subset is that concepts are
introduced by "concept bool" in the TS, but only by "concept" in the draft
standard. Instead of burdening the c++20 implementation with being compatible
to the TS, it would be really great if you could change the implementation of
the TS on GCC7 and GCC8 to also accept just "concept".

Note that I do not suggest backporting any features or other changes, this is
just about a small syntactical change that would allow cleanly writing code
that targets older and newer GCC versions at the same time. I assume this would
be greatly appreciated by quite a few libraries that currently employ different
concept-compatibility layers like range-v3, nanorange, cmstl2 and others. I
also expect more people will be interested in targeting the common concepts
dialect as Clang is picking up Concepts soon (the c++2a-feature branch works
quite well already).

Reply via email to