[Signals2] Compile error saying slot_type is not a type

Hi all,
I'm new to boost and I get the following compile error:
~/FileDesc.h:254: error: `class boost::signals2::signal ::slot_type const& rReadSlot)
{
...
}
...
boost::signals2::signal 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.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 06 July 2009, Marc DelaCruz wrote:
Hi all, I'm new to boost and I get the following compile error:
~/FileDesc.h:254: error: `class boost::signals2::signal
::result_type>, int, std::less<int>, boost::function , typename boost::signals2::detail::extended_signature< boost::function_traits ::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
::slot_type const& rReadSlot)
I think you're missing a 'typename' keyword:
void setReadCallBack(typename boost::signals2::signal

Thanks. I always miss the simple things... ----- Original Message ----- From: Frank Mori Hess [mailto:frank.hess@nist.gov] To: boost-users@lists.boost.org [mailto:boost-users@lists.boost.org] Sent: Mon, 06 Jul 2009 13:27:34 -0500 Subject: Re: [Boost-users] [Signals2] Compile error saying slot_type is not a type
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday 06 July 2009, Marc DelaCruz wrote:
Hi all, I'm new to boost and I get the following compile error:
~/FileDesc.h:254: error: `class boost::signals2::signal
::result_type>, int, std::less<int>, boost::function , typename boost::signals2::detail::extended_signature< boost::function_traits ::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
::slot_type const& rReadSlot)
I think you're missing a 'typename' keyword:
void setReadCallBack(typename boost::signals2::signal
::slot_type const& rReadSlot) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkpSQhYACgkQ5vihyNWuA4W75QCfcUCDAejoxlGFDkCJoAsoqOJj UiYAn36HHhw5Tkg7X7Qls11/0C0xD9T6 =QrLT -----END PGP SIGNATURE----- _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Frank Mori Hess
-
Marc dela Cruz
-
Marc DelaCruz