Boost logo

Boost Users :

Subject: [Boost-users] [Signals2] Compile error saying slot_type is not a type
From: Marc DelaCruz (mdelacruz_at_[hidden])
Date: 2009-07-06 13:30:59


Hi all,
I'm new to boost and I get the following compile error:

~/FileDesc.h:254: error: `class boost::signals2::signal<void
()(ProcessKit::FileDescBase&, M&),
boost::signals2::optional_last_value<typename boost::function_traits<void
()(ProcessKit::FileDescBase&, M&)>::result_type>, int, std::less<int>,
boost::function<void ()(ProcessKit::FileDescBase&, M&)>, typename
boost::signals2::detail::extended_signature< boost::function_traits<void
()(ProcessKit::FileDescBase&, M&)>::arity, void
()(ProcessKit::FileDescBase&, M&)>::function_type,
boost::signals2::mutex>::slot_type' is not a type
~/FileDesc.h:255: error: ISO C++ forbids declaration of `rReadSlot' with no
type

I have code like the following:

template<typename M>
class FileDesc : public FileDescBase
{
    ...
    void setReadCallBack( boost::signals2::signal<void ( FileDescBase&, M&)
>::slot_type const& rReadSlot)
    {
        ...
    }
    ...
    boost::signals2::signal<void ( FileDescBase&, M&) > mReadSignal;
};

I have a feeling it has to do with how/when the templates and the
metaprogramming stuff gets "unrolled/expanded" during compile time. However
I really don't understand the metaprogramming stuff yet.

Thanks.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net