Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2002-07-10 05:15:13


Eric Friedman wrote:
> Any ideas on how to make the following traits template work? It would be
> greatly useful to boost::variant (and probably other applications as
> well).
>
> Essentially, is_better_conversion should have the following
> (well-defined) behavior:
>
> #1: value = true if type To1 is a better conversion than type To2
> #2: value = false if type To2 is a better conversion than type To1
> #3: value = false if neither conversion is better (i.e. conversion is
> ambiguous)
>

See my post to comp.lang.c++.moderated:
http://www.mailgate.org/comp/comp.lang.c++.moderated/msg56919.html

Source code is also available:
http://cpp-experiment.sourceforge.net/best_viable_function-1.0-beta.tar.gz

--
Alexander Nasonov
Fraunhofer Gesellschaft

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk