#14822: wxHtmlLinkEvent and wxHtmlCellEvent: copy constructor missing

5 views
Skip to first unread message

wxTrac

unread,
Nov 12, 2012, 4:00:16 PM11/12/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14822>

#14822: wxHtmlLinkEvent and wxHtmlCellEvent: copy constructor missing
---------------------------------------------+------------------------------
Reporter: tvb377 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxHtml | Version: 2.9.4
Keywords: wxHtmlLinkEvent wxHtmlCellEvent | Blockedby:
Patch: 1 | Blocking:
---------------------------------------------+------------------------------
AFAICS these classes should be given wxDECLARE_DYNAMIC_CLASS_NO_COPY
instead of NO_ASSIGN.

Given their member variables it seems to me an error to attempt to copy an
instance of these classes.

I noticed this during LTO-linking with core,base static libs.
gcc then somehow (actually, I don't understand why, given the wx-#includes
I'm using) emits an auto generated copy constructor for these classes.

After applying the attached changes wxWidgets (wxhtml) still compiles ok.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14822>

wxTrac

unread,
Nov 13, 2012, 8:26:14 AM11/13/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14822#comment:1>

#14822: wxHtmlLinkEvent and wxHtmlCellEvent: copy constructor missing
----------------------+-----------------------------------------------------
Reporter: tvb377 | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxHtml | Version: 2.9.4
Resolution: invalid | Keywords: wxHtmlLinkEvent wxHtmlCellEvent
Blockedby: | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------
Changes (by vadz):

* status: new => closed
* resolution: => invalid


Comment:

No, sorry, this can't be right. The copy ctor shouldn't be disabled (why?)
and is actually used by `Clone()` so removing it should break the
compilation, not fix it. Perhaps you've hit a bug in gcc but the code
looks 100% correct to me and the change 100% wrong.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14822#comment:1>
Reply all
Reply to author
Forward
0 new messages