On 30/09/2010 00:40, Jonathan M Davis wrote:
hich has the appropriate methods will work for any function that
requires a particular API on the type or types that it's dealing with. There's
no need to have any interfaces. They just work if they have the correct API and
don't work if they don't. The isRandomAccessRange() template and its friends are
used in template constraints to improve the error messages you get when a type
doesn't have the correct API, but they aren't strictly-speaking necessary.
Thanks you for taking the time to explain, Jonathan!
It seems however, that these template constraints are just made for
ranges. I maybe wrong but I can't see a general purpose value. I am also
not able to see why an additional vtable entry is necessary to do
ordinary /implements/ validation work. (Finally it is just a contract,
which Mr compiler should negotiate)
Bjoern