Documentation about C++ Concepts

Jonathan Wakely
Mon Dec 21 00:55:00 GMT 2015

On 20 December 2015 at 19:13, Akim Demaille <> wrote:
> Hi!
> I’m looking for a #if guard to enable/disable code using concepts-lite.

As required by the Concepts TS, the compiler defines __cpp_concepts
when it supports concepts.

>  The compiler version does not suffice, as it depends on -std=c++1z.

For GCC you could test __cplusplus to see if -std=c++1z was used,
because Concepts support is always enabled when __cplusplus > 201402L.

>  Also, the documentation about concepts seems to be about the previous attempts at concepts.
> And actually, I did not find the documentation for c++1z, nor even -std=c++14.


> Finally, one would expect to see documentation about -std in "Options Controlling C++ Dialect", since the corresponding about C documents -std for C.

That's the documentation about -std in general, not -std for C. It
says "The following options control the dialect of C (or languages
derived from C, such as C++, ...)"

> Thanks!

More information about the Gcc-help mailing list