Reputation: 1026
I am working on a class project which uses C++ concepts. Where can I find an STL implementation that supports has constraints from the concepts draft TS, such as Equality_comparable
or Sortable
?
Thanks for your help!
Here's what I tried so far:
I've successfully compiled the c++-concepts
branch from GCC's SVN, which appears to be maintained (last updated yesterday by Andrew Sutton). However, the libstdc++ that comes with this branch has not been updated for concepts.
I also tried Concepts-Lite (gcc-clite), which promises:
The standard library shipping with this compiler includes the constraints found in the paper "A Concept Design for the STL", which can be accessed by including the
<type_traits>
header file.
However, libstdc++ in the GCC code downloaded from that page also does not have concepts. In particular, the type_traits
header appears to be unchanged from the GCC revision it was forked from.
Upvotes: 2
Views: 864
Reputation: 16373
Have a look at Andrew Sutton's Origin library on github. If you follow the origin/core
directory you can find the basic concepts. He has some graph, math, and some container stuff stuff too from the look of it.
I have to admit that I'm in the middle of exploring this myself so I have no intelligent report yet.
Only downside: the most recent check-ins are a couple of months or more ago. I guess we'll see.
Upvotes: 2