aboutsummaryrefslogtreecommitdiff
path: root/include/experimental/optional
diff options
context:
space:
mode:
Diffstat (limited to 'include/experimental/optional')
-rw-r--r--include/experimental/optional12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/experimental/optional b/include/experimental/optional
index d68cefdf6c1db..6eb4a2618d2c9 100644
--- a/include/experimental/optional
+++ b/include/experimental/optional
@@ -7,5 +7,15 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
+#ifndef _LIBCPP_EXPERIMENTAL_OPTIONAL
+#define _LIBCPP_EXPERIMENTAL_OPTIONAL
-#error "<experimental/optional> has been removed. Use <optional> instead."
+#include <__config>
+
+#ifdef _LIBCPP_WARNING
+_LIBCPP_WARNING("<experimental/optional> has been removed. Use <optional> instead.")
+#else
+# warning "<experimental/optional> has been removed. Use <optional> instead."
+#endif
+
+#endif // _LIBCPP_EXPERIMENTAL_OPTIONAL