From f99ac7a20024705ebcbd763a30f2f2bfc19d3942 Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Thu, 18 Jul 2019 13:48:02 +0200
Subject: [PATCH] Silence some libcxx versions' warnings about
 std::experimental deprecation

We do our own availability detection in CMake, so we don't care about the deprecation.
---
 src/core/Any.h        | 1 +
 src/core/Filesystem.h | 1 +
 src/core/Optional.h   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/core/Any.h b/src/core/Any.h
index 2799c1e85..ac2f9dbb3 100644
--- a/src/core/Any.h
+++ b/src/core/Any.h
@@ -25,6 +25,7 @@
 #if defined(WALBERLA_USE_STD_ANY)
 #include <any>
 #elif defined(WALBERLA_USE_STD_EXPERIMENTAL_ANY)
+#undef _LIBCPP_WARN_ON_DEPRECATED_EXPERIMENTAL_HEADER
 #include <experimental/any>
 #else
 #include <boost/any.hpp>
diff --git a/src/core/Filesystem.h b/src/core/Filesystem.h
index c7bdf2e12..24e14a868 100644
--- a/src/core/Filesystem.h
+++ b/src/core/Filesystem.h
@@ -25,6 +25,7 @@
 #if defined(WALBERLA_USE_STD_FILESYSTEM)
 #include <filesystem>
 #elif defined(WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM)
+#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM
 #include <experimental/filesystem>
 #else
 #include <boost/filesystem.hpp>
diff --git a/src/core/Optional.h b/src/core/Optional.h
index ad23d1666..60883fd3d 100644
--- a/src/core/Optional.h
+++ b/src/core/Optional.h
@@ -25,6 +25,7 @@
 #if defined(WALBERLA_USE_STD_OPTIONAL)
 #include <optional>
 #elif defined(WALBERLA_USE_STD_EXPERIMENTAL_OPTIONAL)
+#undef _LIBCPP_WARN_ON_DEPRECATED_EXPERIMENTAL_HEADER
 #include <experimental/optional>
 #else
 #include <boost/optional.hpp>
-- 
GitLab