summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2017-10-23 20:25:58 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2017-10-23 20:25:58 +0000
commitb367de5dc31371f88b59e165aa6b8be4ed9ee070 (patch)
tree8517bc2e3717c7759be570e3b44b39e5d294aeaa /include
parent802561b2cc6cd4e4f59815f7de199026de62a650 (diff)
Add INCLUDE_UNIQUE_PTR and use it (PR bootstrap/82610)
gcc/ChangeLog: PR bootstrap/82610 * system.h: Conditionally include "unique-ptr.h" if INCLUDE_UNIQUE_PTR is defined. * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor of defining INCLUDE_UNIQUE_PTR before including "system.h". include/ChangeLog: * unique-ptr.h: Make include of <memory> conditional on C++11 or later. From-SVN: r254024
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/unique-ptr.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 805e81c0227..8ccc57ae783 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-23 David Malcolm <dmalcolm@redhat.com>
+
+ * unique-ptr.h: Make include of <memory> conditional on C++11 or
+ later.
+
2017-10-16 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
David Malcolm <dmalcolm@redhat.com>
diff --git a/include/unique-ptr.h b/include/unique-ptr.h
index c5ca031c284..0b6f11a8146 100644
--- a/include/unique-ptr.h
+++ b/include/unique-ptr.h
@@ -74,7 +74,9 @@
#ifndef GNU_UNIQUE_PTR_H
#define GNU_UNIQUE_PTR_H 1
-#include <memory>
+#if __cplusplus >= 201103
+# include <memory>
+#endif
namespace gnu
{