[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] "error: forward declaration of `st,ruct wxDataFormat'"
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] "error: forward declaration of `st,ruct wxDataFormat'" |
Date: |
Wed, 22 Dec 2010 12:58:41 +0100 |
On Tue, 21 Dec 2010 20:49:10 +0000 Greg Chicares <address@hidden> wrote:
GC> With wx-2.9, MinGW gcc-3.4.5, and libstdc++ debug mode, the compiler
GC> complains about forward-declaring wxDataObject in 'wx/clipbrd.h'.
GC> This occurs in an lmi file which includes these headers:
GC> #include <wx/clipbrd.h>
GC> #include <wx/dataobj.h>
GC> in that order.
Hello,
This should have been fixed by http://trac.wxwidgets.org/changeset/61485.
I hadn't originally realized that we couldn't use vectors of incomplete
types but in fact the paragraph 2 of 17.4.3.6 applies to std::vector<> too
(even though its trivial implementation wouldn't rely on the type being
complete) and so the old code resulted in undefined behaviour and had to be
changed.
Regards,
VZ