|
Boost : |
From: E. Gladyshev (egladysh_at_[hidden])
Date: 2003-10-31 21:15:26
--- Eric Friedman <ebf_at_[hidden]> wrote:
> To all-
>
> Seeking to extend support of the variant< type-sequence > syntax to all
> platforms, I've returned to the problem of simulating overload
> resolution rules.
>
> In this direction, I have implemented the following type trait, which
> works as follows:
>
> is_better_conversion< From, To1, To2 >
> --> true iff conversion unambiguously prefers To1 over To2
>
> I have previously determined that is_better_conversion is sufficient to
> implement the variant< type-sequence > syntax. Unfortunately, I cannot
> get it to compile on MSVC6 or Borland.
>
> If anyone could help me in this regard (see attached files), it would be
> of great benefit to users of Boost.Variant.
>
I did a quick check on my old MSVC6 machine
The compiler gives ICE at the line:
typedef ::boost::mpl::bool_<
( sizeof( check_(from_,0) ) == sizeof( ::boost::type_traits::yes_type ) )
> type;
If I replace it with
enum
{
value = ( sizeof( check_(from_,0) ) == sizeof( ::boost::type_traits::yes_type ) )
};
typedef boost::mpl::bool_<value> type;
The ICE is gone but I get the
'check_(int,int)' have different return types' error
I think the problem is that the first decration of check_()
is a template while the rest of them are not.
Somehow it messes MSVC6 up.
Eugene
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk