]> git.saurik.com Git - wxWidgets.git/commitdiff
fix compilation with wxUSE_STL=1 for VC6 (and presumably others) (bug 1614814)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Dec 2006 01:47:26 +0000 (01:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 15 Dec 2006 01:47:26 +0000 (01:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/list.h

index b83555f1010beeec28e968b5e95d06324ab8d266..ac1a417acdc3be4b7471757d10bf0ca6c89adcad 100644 (file)
@@ -92,6 +92,7 @@ Major new features in 2.8 release
 
 All:
 
+- Fix compilation with wxUSE_STL=1
 - wxGrid::GetBestSize() returns same size the grid would have after AutoSize()
 
 wxMSW:
index 8c19a070ec5fe9b705d36978a25be2d4805dfb42..4a8541d37208fa617b0c823cdd9afcda666f2cf3 100644 (file)
@@ -181,16 +181,18 @@ private:
         static BaseListType EmptyList;                                        \
                                                                               \
         bool m_destroy;                                                       \
+                                                                              \
     public:                                                                   \
         decl compatibility_iterator                                           \
         {                                                                     \
         private:                                                              \
-          /* Workaround for broken VC6 nested class name resolution */        \
-          typedef std::list<elT>::iterator iterator;                          \
-          friend class liT;                                                   \
-        private:                                                              \
+            /* Workaround for broken VC6 nested class name resolution */      \
+            typedef std::list<elT>::iterator iterator;                        \
+            friend class liT;                                                 \
+                                                                              \
             iterator m_iter;                                                  \
             liT * m_list;                                                     \
+                                                                              \
         public:                                                               \
             compatibility_iterator()                                          \
                 : m_iter(EmptyList.end()), m_list( NULL ) {}                  \
@@ -338,6 +340,9 @@ private:
         void Sort( wxSortCompareFunction compfunc )                           \
             { sort( WX_LIST_SORTFUNCTION( elT, compfunc ) ); }                \
         ~liT() { Clear(); }                                                   \
+                                                                              \
+        /* It needs access to our EmptyList */                                \
+        friend decl compatibility_iterator;                                   \
     }
 
 #define WX_DECLARE_LIST(elementtype, listname)                              \