C++ Logo

std-discussion

Advanced search

Concepts in STL implementations in C++11/14/17

From: Myria <myriachan_at_[hidden]>
Date: Tue, 3 Dec 2019 12:31:57 -0800
Let's say that a compiler adds keywords __concepts and __requires that
are equivalent to concepts and requires, except that they function
even when the compiler is set to C++11/14/17 mode. Then the STL is
modified to use concepts.

Because concepts would simplify a bunch of the STL, and provide much
better error messages when it is misused, it would seem like concepts
could be useful for the C++11/14/17 modes of new compiler versions.
But would it break C++11/14/17 to use concepts in the STL
implementation?

Admittedly, I have no idea what any of their plans are with the STL in
order to maintain their 11/14/17 modes with a concept-ified STL.

The same could apply if there were a __spaceship keyword, I suppose.

Melissa

Received on 2019-12-03 14:34:31