'''ConceptCpp''' (Concept''''''C++) http://www.generic-programming.org/languages/conceptcpp/ ''Concept''''''C++ is an extension to the C++ Programming Language that introduces first-class support for GenericProgramming. It is the first attempt to introduce complete support for GenericProgramming into a mainstream programming language. Concept''''''C++ is a strong candidate for inclusion into the upcoming ANSI/ISO C++ Standard, dubbed C++0x. The OpenSystemsLaboratory at IndianaUniversity is developing a prototype compiler for Concept''''''C++, ConceptGcc.'' See also TheCppStandardsCommittee ConceptIntersection CppAndConcepts CeePlusPlusEleven NOTE: Concepts were dropped from the CeePlusPlusEleven standard. ---- Pardon my confusion, I thought the templates in C++ ''were'' generic programming. How are CppTemplates incomplete? How much more generic does ConceptCpp make them? ---- There is some discussion of the need for more than just templates on the pages here named GenericProgramming and SetsOfRequirements. The problem with C++ templates is that there is no type checking associated with the use of the templates. The new proposals enable checking to be done at compile time that the type being passed will supply what is needed for proper execution. There is a lot of information on the page referenced above, including a link to a talk describing the problem and what is proposed. A link to the talk is provided below. -- JohnFletcher ''Concepts: Extending the C++ Template System for Generic Programming'' * http://video.google.com/videoplay?docid=-1790714981047186825 (58+ minutes) ---- '''Example Code''' #include #include using namespace std; void f() { list l; sort(l.begin(), l.end()); } This does not compile as a '''list''' cannot be sorted. The concepts compiler ConceptGcc gives the following error text: features.cpp: In function 'void f()': features.cpp:13: error: no matching function for call to 'sort(std::_List_iterator, std::_List_iterator)' /opt/conceptgcc/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:2874: note: candidates are: void std::sort(_Iter, _Iter) [with _Iter = std::_List_iterator] features.cpp:13: note: no concept map for requirement 'std::Mutable''''''Random''''''Access''''''Iterator >' This works because the concepts have been built into the StandardTemplateLibrary implementation which comes with the ConceptGcc compiler. There is also syntax for users to define their own concepts. ---- For another example see FunctoidsInCppWithConceptCpp. ---- '''2011''' ConceptGcc is no longer being developed. There is a version of Clang (CeeLanguageFamilyFrontEnd) which includes concepts. ---- CategoryCpp CategoryCppTemplates CategoryConcepts