Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-22 07:24:07


----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>

> I've finally investigated this, and tried to get a workaround in place,
but
> VC6's quirkiness has bested me in this arena. It's clearly a bug in
overload
> resolution, because the version of get_invocable_slot it picks is
_always_
> the wrong one in this case (in fact, the one it picks can't ever work, so
it
> complains). Of course, it magically works if SlotFunctor is declared
outside
> of A, but fails when SlotFunction is a member in A. Maybe this works in
VC7?
> (test program below)

FWIW:

c:\boost\boost\signals\slot.hpp(97) : error C2664:
'boost::reference_wrapper<T>
boost::signals::detail::slot_base::get_invocable_slot(const F
&,boost::signals::detail::signal_tag)' : cannot convert parameter 2 from
'boost::signals::detail::get_slot_tag<S>::type' to
'boost::signals::detail::signal_tag'
        with
        [
            T=const A::SlotFunctor,
            F=A::SlotFunctor
        ]
        and
        [
            S=A::SlotFunctor
        ]
        No constructor could take the source type, or constructor overload
resolution was ambiguous
        foo.cpp(37) : see reference to function template instantiation
'boost::slot<SlotFunction>::slot(const F &)' being compiled
        with
        [

SlotFunction=boost::signal0<void,boost::last_value<void>,int,std::less<int>
,boost::function0<void,boost::empty_function_policy,boost::empty_function_m
ixin,int>>::slot_function_type,
            F=A::SlotFunctor
        ]
c:\boost\boost\signals\slot.hpp(52) : error C2143: syntax error : missing
')' before 'const'
c:\boost\boost\signals\slot.hpp(52) : error C2780: 'const F
&boost::signals::detail::slot_base::get_invocable_slot(const F
&,boost::signals::detail::value_tag)' : expects 2 arguments - 1 provided
        c:\boost\boost\signals\slot.hpp(56) : see declaration of
'boost::signals::detail::slot_base::get_invocable_slot'
c:\boost\boost\signals\slot.hpp(52) : error C2780: 'const F
&boost::signals::detail::slot_base::get_invocable_slot(const F
&,boost::signals::detail::reference_tag)' : expects 2 arguments - 1
provided
        c:\boost\boost\signals\slot.hpp(52) : see declaration of
'boost::signals::detail::slot_base::get_invocable_slot'
c:\boost\boost\signals\slot.hpp(52) : error C2780:
'boost::reference_wrapper<F>
boost::signals::detail::slot_base::get_invocable_slot(const F
&,boost::signals::detail::signal_tag)' : expects 2 arguments - 1 provided
        c:\boost\boost\signals\slot.hpp(48) : see declaration of
'boost::signals::detail::slot_base::get_invocable_slot'
c:\tools\Vc7\include\xmemory(111) : fatal error C1004: unexpected end of
file found

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


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