From cb6e0ef6ba6446ef34a2f5c0390779814e46f385 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Sat, 3 Oct 2020 17:24:34 +0200
Subject: [PATCH] Prepare compilation for C++17: std::any does not have `empty`

---
 src/blockforest/PhantomBlock.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/blockforest/PhantomBlock.h b/src/blockforest/PhantomBlock.h
index 7f42061ab..6afe73bec 100644
--- a/src/blockforest/PhantomBlock.h
+++ b/src/blockforest/PhantomBlock.h
@@ -87,7 +87,13 @@ public:
    template< typename T >
    T getData() const { return walberla::any_cast<T>( data_ ); }
    
-   bool hasData() const { return !(data_.empty()); }
+   bool hasData() const {
+#ifdef WALBELRLA_USE_STD_ANY 
+      return data_.has_value();
+#else
+      return !(data_.empty());
+#endif
+   }
    
    inline       void                             clearNeighborhoodSection  ( const uint_t index );
    inline const std::vector< NeighborBlock * > & getNeighborhoodSection    ( const uint_t index ) const;
-- 
GitLab