Introduction
ConceptClang is an implementation of concepts for C++ in Clang -- an LLVM frontend for the C family of programing languages. Its aim is to provide an easily extensible infrastructure for implementing differing concepts proposals, particularly those that arose during discussion prior to its removal as a feature for C++0x. It is currently under development and the features undergo include:
- Implicit and Explicit concepts
- Concept refinement
- Concept map templates
- Constrained templates
- Concept-based overloading
- Concept ids as qualified names
Talks and Publications
The current prototype is available for download here:
To live on the edge, you can also checkout from the repository instead:
- svn co https://svn.osl.iu.edu/rep/conceptcpp/trunk/ConceptClang clang --username conceptclang --password proto11
(Just make sure to use a compatible revision of LLVM.)
Once ConceptClang is installed, you can play around with the following test
programs, available in a bulk download: Experiments.tar.gz
- Basic Example: apple-to-apple
- cd Experiments/AppleToApple/
- LLVM_DIR/Debug+Asserts/bin/clang++ Test.cpp -o apple2apple
- ./apple2apple
Expected result:
Results:
int (2) --> 2
apple (5) --> 5
orange (Valencia) --> Valencia
- Practical Example: Mini-BGL
- cd Experiments/MiniBGL/test
- LLVM_DIR/Debug+Asserts/bin/clang++ -I../include/ Test.cpp -o minibgl
- ./minibgl
Expected result:
0 0 1 4 2 3 5 6
- … More examples coming up soon …
Please submit all bug reports or comments to Larisse, with "[ConceptClang-Bug]" in the subject line:
email: lvoufo at osl dot iu dot edu.
|
|