[C++-sig] bpl_utils explained

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Mon Jul 29 10:40:04 CEST 2002


--- David Abrahams <dave at boost-consulting.com> wrote:
> > Now say std::vector<int> is class 1 & 2 convertible, and
> > std::vector<double> only class 2. If the object to be converted
> > is a wrapped std::vector<int> it will be converted class 1,
> > otherwise the overload tried first will be used.
> 
> That would be nice, but it ain't so. If the vector<double> overload is
> tried first it will match, and overload resolution will stop there.

Ouch.

Please forgive me, but I still feel I can protect myself from confusing
situations due to the "naive" overload resolution mechanism by restricting the
from_python_sequence converters to lists, tuples, iterators and xranges. For
the time being. To be relaxed once the overload resolution mechanism is
enhanced. Does that make sense as an interim approach?

Ralf


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com




More information about the Cplusplus-sig mailing list