In C++, the word "Concepts" has a specific meaning:
http://en.wikipedia.org/wiki/Concepts_%28C%2B%2B%29
You don't really need to worry about them, since they were not sufficiently realized to be included in C++11. The basic idea behind Concepts, AFAIU, is to apply some formal reasoning to templates so that they are less wild to play with.
For example, right now you can declare a template function like this:
1 2 3 4 5 6 7 8 9
|
template <typename ContainerType>
typename ContainerType::value_type
sum_elts( ContainerType& container )
{
typename ContainerType::value_type result = 0;
for (typename ContainerType::size_type n = 0; n < container.size(); n++)
result += container[ n ];
return result;
}
|
This kind of function never appears in code written by people who know better, but it is perfectly legal. The problem is that you can instanciate it with, say, a
std::
list. The compiler tries to compile it, gets confused, and barfs all over your terminal. You, bewildered, wonder what went wrong as you try to pick your way through the unfathomable chunks.
"Concepts" tries to fix this by modifying the template system to indicate what it can and cannot support, so that the compiler (and humans) can more directly reason about what is and is not acceptable.
Hope this helps.