From c56fda7160d3557005e074105c97f2a8fbf3925c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 23 Oct 2023 06:49:06 -0600 Subject: [PATCH] Use std::any instead of boost::any in GeneralDataStorage. --- .../deal.II/algorithms/general_data_storage.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/deal.II/algorithms/general_data_storage.h b/include/deal.II/algorithms/general_data_storage.h index 23ee33bf2c..30746c2daa 100644 --- a/include/deal.II/algorithms/general_data_storage.h +++ b/include/deal.II/algorithms/general_data_storage.h @@ -21,10 +21,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -330,14 +330,14 @@ public: /** @} */ /** - * An entry with this name does not exist in the internal boost::any map. + * An entry with this name does not exist in the internal std::any map. */ DeclException1(ExcNameNotFound, std::string, << "No entry with the name " << arg1 << " exists."); /** - * An entry with this name does not exist in the internal boost::any map. + * An entry with this name does not exist in the internal std::any map. */ DeclException1(ExcNameHasBeenFound, std::string, @@ -357,7 +357,7 @@ private: /** * Arbitrary user data, identified by a string. */ - std::map any_data; + std::map any_data; }; @@ -426,11 +426,11 @@ GeneralDataStorage::get_object_with_name(const std::string &name) if (any_data[name].type() == typeid(Type *)) { - p = boost::any_cast(any_data[name]); + p = std::any_cast(any_data[name]); } else if (any_data[name].type() == typeid(Type)) { - p = boost::any_cast(&any_data[name]); + p = std::any_cast(&any_data[name]); } else { @@ -454,12 +454,12 @@ GeneralDataStorage::get_object_with_name(const std::string &name) const if (it->second.type() == typeid(Type *)) { - const Type *p = boost::any_cast(it->second); + const Type *p = std::any_cast(it->second); return *p; } else if (it->second.type() == typeid(Type)) { - const Type *p = boost::any_cast(&it->second); + const Type *p = std::any_cast(&it->second); return *p; } else -- 2.39.5