[C++-sig] Re: Adding __len__ to range objects

David Abrahams dave at boost-consulting.com
Sat Sep 6 15:57:00 CEST 2003


Raoul Gough <RaoulGough at yahoo.co.uk> writes:

>
> I see. Unless there is some kind of template meta-programming magic to
> detect operator==, we would need a manual switch. Maybe we could break
> this down by introducing not only a container_traits template, but a
> value_traits one as well. The container_traits could then make use of
> value_traits<container::value_type> internally to figure out whether
> things like find() are possible, and the client code could specialize
> value_traits where necessary. In most cases, of course, the defaults
> would work, but in special cases only minimal work is required for the
> client code, since value_traits would probably be very simple.

Yup.  This is all starting to sound a lot like Alexander Nasonov's
dynamic_any.


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list