From: Wolfgang Bangerth Date: Mon, 23 Oct 2023 12:49:06 +0000 (-0600) Subject: Use std::any instead of boost::any in GeneralDataStorage. X-Git-Tag: relicensing~371^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c56fda7160d3557005e074105c97f2a8fbf3925c;p=dealii.git Use std::any instead of boost::any in GeneralDataStorage. --- 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