XML catalogue of packages which are available for installation, using the mingw-get installer.
Revision | 44ebeae0cc6d110b340ad63ae805c0cd76482c9a (tree) |
---|---|
Time | 2019-10-13 21:38:06 |
Author | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Update to accommodate C++11 deprecation of "auto_ptr".
@@ -1,3 +1,11 @@ | ||
1 | +2019-10-13 Keith Marshall <keith@users.osdn.me> | |
2 | + | |
3 | + Update to accommodate C++11 deprecation of "auto_ptr". | |
4 | + | |
5 | + * tests/xmlcheck.cpp (unique_or_auto_ptr): New macro; define it... | |
6 | + [__cplusplus >= 201103L]: ...as "unique_ptr", for C++11 onward, or... | |
7 | + [__cplusplus < 201103L]: ...as "auto_ptr", for earlier C++. | |
8 | + | |
1 | 9 | 2019-07-06 Keith Marshall <keith@users.osdn.me> |
2 | 10 | |
3 | 11 | Publish MinGW.org WSL-5.2.2 package set. |
@@ -16,7 +16,7 @@ | ||
16 | 16 | * |
17 | 17 | * |
18 | 18 | * Adaptation by Keith Marshall <keithmarshall@users.sourceforge.net> |
19 | - * Copyright (C) 2013, MinGW.org Project | |
19 | + * Copyright (C) 2013, 2019, MinGW.org Project | |
20 | 20 | * |
21 | 21 | * This is free software. Permission is granted to copy, modify and |
22 | 22 | * redistribute this software, under the provisions of the GNU General |
@@ -42,6 +42,17 @@ | ||
42 | 42 | |
43 | 43 | #include <libgen.h> /* for basename() */ |
44 | 44 | |
45 | +#if __cplusplus >= 201103L | |
46 | +/* C++11 deprecates auto_ptr, in favour of shared_ptr or unique_ptr; | |
47 | + * prefer the latter alternative, in this case. | |
48 | + */ | |
49 | +#define unique_or_auto_ptr unique_ptr | |
50 | +#else | |
51 | +/* Using a pre-C++11 compiler; must still use auto_ptr | |
52 | + */ | |
53 | +#define unique_or_auto_ptr auto_ptr | |
54 | +#endif | |
55 | + | |
45 | 56 | #include <xercesc/util/XMLUni.hpp> |
46 | 57 | #include <xercesc/util/XMLString.hpp> |
47 | 58 | #include <xercesc/util/PlatformUtils.hpp> |
@@ -267,7 +278,7 @@ validation_status( int argc, char **argv ) | ||
267 | 278 | /* Initialize a grammer pool, for use by our parser instances. |
268 | 279 | */ |
269 | 280 | MemoryManager* mm( XMLPlatformUtils::fgMemoryManager ); |
270 | - auto_ptr<XMLGrammarPool> gp( new XMLGrammarPoolImpl( mm ) ); | |
281 | + unique_or_auto_ptr<XMLGrammarPool> gp( new XMLGrammarPoolImpl( mm ) ); | |
271 | 282 | |
272 | 283 | /* Load the schema definitions into the grammar pool. |
273 | 284 | */ |