Define wxArchiveIterator in all builds, not just STL one

Doing this doesn't introduce any backwards compatibility problems, so do
it always, and not only when wxUSE_STL==1.
This commit is contained in:
Vadim Zeitlin 2023-04-08 23:03:24 +01:00
parent d0e892ac09
commit e9527ee5a2
5 changed files with 1 additions and 18 deletions

View file

@ -164,7 +164,6 @@ private:
// An input iterator that can be used to transfer an archive's catalog to
// a container.
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
#include <iterator>
#include <utility>
@ -296,8 +295,6 @@ typedef wxArchiveIterator<wxArchiveInputStream> wxArchiveIter;
typedef wxArchiveIterator<wxArchiveInputStream,
std::pair<wxString, wxArchiveEntry*> > wxArchivePairIter;
#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
/////////////////////////////////////////////////////////////////////////////
// wxArchiveClassFactory
@ -314,10 +311,8 @@ public:
typedef wxArchiveInputStream instream_type;
typedef wxArchiveOutputStream outstream_type;
typedef wxArchiveNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIter iter_type;
typedef wxArchivePairIter pairiter_type;
#endif
virtual ~wxArchiveClassFactory() { }

View file

@ -289,11 +289,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
// Iterators
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxTarInputStream> wxTarIter;
typedef wxArchiveIterator<wxTarInputStream,
std::pair<wxString, wxTarEntry*> > wxTarPairIter;
#endif
/////////////////////////////////////////////////////////////////////////////
@ -306,10 +304,8 @@ public:
typedef wxTarInputStream instream_type;
typedef wxTarOutputStream outstream_type;
typedef wxTarNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxTarIter iter_type;
typedef wxTarPairIter pairiter_type;
#endif
wxTarClassFactory();

View file

@ -458,11 +458,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
// Iterators
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxArchiveIterator<wxZipInputStream> wxZipIter;
typedef wxArchiveIterator<wxZipInputStream,
std::pair<wxString, wxZipEntry*> > wxZipPairIter;
#endif
/////////////////////////////////////////////////////////////////////////////
@ -475,10 +473,8 @@ public:
typedef wxZipInputStream instream_type;
typedef wxZipOutputStream outstream_type;
typedef wxZipNotifier notifier_type;
#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
typedef wxZipIter iter_type;
typedef wxZipPairIter pairiter_type;
#endif
wxZipClassFactory();

View file

@ -497,9 +497,7 @@ public:
@class wxArchiveIterator
An input iterator template class that can be used to transfer an archive's
catalogue to a container. It is only available if wxUSE_STL is set to 1
in setup.h, and the uses for it outlined below require a compiler which
supports member templates.
catalogue to a container.
@code
template<class Arc, class T = typename Arc::entry_type*>

View file

@ -9,8 +9,6 @@
#ifndef WX_ARCHIVETEST_INCLUDED
#define WX_ARCHIVETEST_INCLUDED 1
#define WX_TEST_ARCHIVE_ITERATOR
#include "wx/archive.h"
#include "wx/wfstream.h"