• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-dist: Commit

XML catalogue of packages which are available for installation, using the mingw-get installer.


Commit MetaInfo

Revision44ebeae0cc6d110b340ad63ae805c0cd76482c9a (tree)
Time2019-10-13 21:38:06
AuthorKeith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Update to accommodate C++11 deprecation of "auto_ptr".

Change Summary

Incremental Difference

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
19 2019-07-06 Keith Marshall <keith@users.osdn.me>
210
311 Publish MinGW.org WSL-5.2.2 package set.
--- a/tests/xmlcheck.cpp
+++ b/tests/xmlcheck.cpp
@@ -16,7 +16,7 @@
1616 *
1717 *
1818 * Adaptation by Keith Marshall <keithmarshall@users.sourceforge.net>
19- * Copyright (C) 2013, MinGW.org Project
19+ * Copyright (C) 2013, 2019, MinGW.org Project
2020 *
2121 * This is free software. Permission is granted to copy, modify and
2222 * redistribute this software, under the provisions of the GNU General
@@ -42,6 +42,17 @@
4242
4343 #include <libgen.h> /* for basename() */
4444
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+
4556 #include <xercesc/util/XMLUni.hpp>
4657 #include <xercesc/util/XMLString.hpp>
4758 #include <xercesc/util/PlatformUtils.hpp>
@@ -267,7 +278,7 @@ validation_status( int argc, char **argv )
267278 /* Initialize a grammer pool, for use by our parser instances.
268279 */
269280 MemoryManager* mm( XMLPlatformUtils::fgMemoryManager );
270- auto_ptr<XMLGrammarPool> gp( new XMLGrammarPoolImpl( mm ) );
281+ unique_or_auto_ptr<XMLGrammarPool> gp( new XMLGrammarPoolImpl( mm ) );
271282
272283 /* Load the schema definitions into the grammar pool.
273284 */
Show on old repository browser