Skip to content
Snippets Groups Projects
Commit cb6e0ef6 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Prepare compilation for C++17: std::any does not have `empty`

parent ba2c6619
No related merge requests found
...@@ -87,7 +87,13 @@ public: ...@@ -87,7 +87,13 @@ public:
template< typename T > template< typename T >
T getData() const { return walberla::any_cast<T>( data_ ); } 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 void clearNeighborhoodSection ( const uint_t index );
inline const std::vector< NeighborBlock * > & getNeighborhoodSection ( const uint_t index ) const; inline const std::vector< NeighborBlock * > & getNeighborhoodSection ( const uint_t index ) const;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment