Boost logo

Boost :

From: Hugo Duncan (hugoduncan_at_[hidden])
Date: 2003-11-03 18:28:21


Eric Friedman <ebf_at_[hidden]> wrote:

> 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.

Using the GCC workaround, and modifying the class below to add self_t
results in successful compilation on bcc564.

Hugo

template <typename From, typename To1, typename To2>
struct is_better_conversion_impl
{
     static From _m_from;
     static bool const value =
         sizeof( is_better_conversion_checker<To1,To2>::_m_check(_m_from,
0) )
         == sizeof(::boost::type_traits::yes_type);

     typedef is_better_conversion_impl<From, To1, To2> self_t;
     typedef ::boost::mpl::bool_<self_t::value> type;
};


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