Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Concepts-Lite in gcc (with links to TS)

As highlighted by a recent answer to this question, gcc now supports concepts-lite in builds from its svn trunk.

The same question links to the most recent TS, N4377. Edit - answer has a newer TS.

A helpful paper can be found labelled N3580 - this is from 2013, and the authors are Andrew Sutton, Bjarne Stroustrup and Gabriel Dos Reis.

A list of tweaks to N4377 can be found labelled N4434. This gives 3 suggested changes to the N4377 paper and lists as its reply point Walter E. Brown.

These papers/Technical Specifications are similar, but have various small changes in each case.

Is there some simple way to discover what gcc currently implements? Or indeed, plans to implement?

As a side question: Is ConceptClang or some similarly named project related to the c++1z concepts? A mailing list post from May 2015 collected some thoughts, in particular that:

Larisse may have some work done for the concepts ts, in addition to her C++0x efforts.

No further reply was made to that thread.

like image 856
chrisb2244 Avatar asked Sep 26 '22 11:09

chrisb2244


1 Answers

It's my understanding that the GCC maintainers plan to implement Concepts as specified in the final TS that is soon to be published: N4549 C++ Extensions for Concepts. Most of that specification is implemented in GCC, with the notable exception of "generalized auto deduction" which is necessary to compile syntax like std::pair<auto, auto> foo = std::make_pair(x, y);. The implementation is still very rough - a quick search for open bugs with "[concepts]" in the title has 38 hits, so exactly what is implemented and what works well changes from week to week.

Is ConceptClang or some similarly named project related to the c++1z concepts?

ConceptClang is (was?) an implementation of C++0x concepts which I believe has been dead for some time now. There are a few people who have started looking at implementing the Concepts TS in clang in the last several months, they've only submitted a handful of patches to recognize the concept keyword and parse the syntax of concept function and variable declarations.

like image 75
Casey Avatar answered Sep 30 '22 08:09

Casey