|
Boost : |
Subject: Re: [boost] [signals2] trunk - vc++ 10 warning about assignment operator
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2011-05-12 09:23:55
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, May 11, 2011, Edward Diener wrote:
> The class in question is evidently
> "boost::signals2::detail::signal3_impl<R,T1,T2,T3,Combiner,Group,GroupCom
> pare,SlotFunction,ExtendedSlotFunction,Mutex>::slot_invoker", so I guess
> I am saying that this vc++ warning should be suppressed there. My own
> template, given in my OP, is not the culprit.
Does the attached patch which declares the assignment operator private
suppress the warnings?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk3L33AACgkQ5vihyNWuA4ViSgCePepWNPEUIHuFcek3afnSt6yh
wLsAniAqkwN81bqciVHVdfI3ikRLtjQR
=G0CI
-----END PGP SIGNATURE-----
--Boundary-00=_w99yNJuuLGhOVKz
Content-Type: text/x-patch;
charset="UTF-8";
name="mydiff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="mydiff"
Index: boost/signals2/detail/signal_template.hpp
===================================================================
--- boost/signals2/detail/signal_template.hpp (revision 70818)
+++ boost/signals2/detail/signal_template.hpp (working copy)
@@ -345,6 +345,9 @@
resolver);
}
private:
+ // declare assignment operator private since this class might have reference or const members
+ slot_invoker & operator=(const slot_invoker &);
+
#define BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT(z, n, data) \
BOOST_SIGNALS2_ADD_REF_TYPE(~, n, ~) BOOST_SIGNALS2_M_ARG_NAME(~, n, ~) ;
BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT, ~)
--Boundary-00=_w99yNJuuLGhOVKz--
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk