Boost logo

Boost :

From: jaakko.jarvi_at_[hidden]
Date: 2001-05-29 02:53:08


--- In boost_at_y..., Chris Little <cslittle_at_r...> wrote:

> I've applied all of Kostya's changes

There's now a new version in Files|Tuples with Kostya's changes,
and that compiles ok with the Borland compiler.

> but I am still having compile problems
> with CW 6.2.
>
> When I compile tuple_test_bench.cpp I get the errors:
>
> Error : ambiguous use of partial specialization
> (instantiating:
>
'boost::tuples::convert_to_plain_by_default<boost::tuples::reference_wrapper
> <const A>>')
> type_conversions.hpp line 173 typedef typename
> detail::parameter_traits_<T, T>::type type;
>
> ...

Hmm..., the second template argument of detail::parameter_traits_
is always totally unspecialized in all specializations of the
parameter_traits_ template, so the first template argument determines
which specialization to choose.
I can't figure out what the problem is, the two specializations that
come close are:

template<class T, class Any>
struct parameter_traits_<reference_wrapper<T>, Any >{
  typedef T& type;
};

template<class T, class Any>
struct parameter_traits_<const reference_wrapper<T>, Any >{
  typedef T& type;
};

Could the specialization for const reference_wrapper be where the
compiler chokes?

Cheers, Jaakko


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