c++,g++,generic-programming,c++-concepts,c++1z
According to Andrew Sutton the git mirror of the Concepts Lite work is entirely out of date and shouldn't be used. There is a concepts branch in the svn repository for gcc implementing "concepts-lite" (there was a pre-C++11 effort to add concepts to C++ which was abandoned; a new effort...
c++,boost,sfinae,typetraits,c++-concepts
Constructors are not member functions - they don’t have an address that you can take, so it is impossible to test for their presence in a straightforward way with SFINAE*. While it isn't exactly what you asked for, with C++11 you can get close with std::is_constructible, and with C++03 you...
c++,static-assert,c++-concepts
tl;dr Compared to static_asserts, concepts are more powerful because: they give you good diagnostic that you wouldn't easily achieve with static_asserts they let you easily overload template functions without std::enable_if (that is impossible only with static_asserts) they let you define static interfaces and reuse them without losing diagnostic (there would...
c++,polymorphism,sfinae,typetraits,c++-concepts
Here is a minimum compilable example of how you might want to do it. Note that at the moment, this example only supports const begin() and const end(). The addition of further methods and a mutable iterator is an exercise for the reader EDIT: provided working example of both compile...
After reading shortly Wikipedia explanation of C++ "concepts" it looks to me like tool with same goals as generic classes and type constraints in C# If I understood it correctly then by following older Stack Overflow question Representing a C# Generic Method in a UML Class Diagram it turns out...