From: David Wells Date: Mon, 30 Jun 2025 13:32:47 +0000 (-0400) Subject: Mapping: remove some comments on covariant returns. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18602%2Fhead;p=dealii.git Mapping: remove some comments on covariant returns. This isn't relevant anymore since we use smart pointers as covariant return may only be used with plain pointers and references. --- diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index 082e89a90c..4ead3644a7 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -777,13 +777,6 @@ protected: * @return A pointer to a newly created object of type InternalDataBase (or * a derived class). Ownership of this object passes to the calling * function. - * - * @note C++ allows that virtual functions in derived classes may return - * pointers to objects not of type InternalDataBase but in fact pointers to - * objects of classes derived from InternalDataBase. (This feature is - * called "covariant return types".) This is useful in some contexts where - * the calling is within the derived class and will immediately make use of - * the returned object, knowing its real (derived) type. */ virtual std::unique_ptr get_data(const UpdateFlags update_flags, @@ -808,13 +801,6 @@ protected: * @return A pointer to a newly created object of type InternalDataBase (or * a derived class). Ownership of this object passes to the calling * function. - * - * @note C++ allows that virtual functions in derived classes may return - * pointers to objects not of type InternalDataBase but in fact pointers to - * objects of classes derived from InternalDataBase. (This feature is - * called "covariant return types".) This is useful in some contexts where - * the calling is within the derived class and will immediately make use of - * the returned object, knowing its real (derived) type. */ virtual std::unique_ptr get_face_data(const UpdateFlags update_flags, @@ -847,13 +833,6 @@ protected: * @return A pointer to a newly created object of type InternalDataBase (or * a derived class). Ownership of this object passes to the calling * function. - * - * @note C++ allows that virtual functions in derived classes may return - * pointers to objects not of type InternalDataBase but in fact pointers to - * objects of classes derived from InternalDataBase. (This feature is - * called "covariant return types".) This is useful in some contexts where - * the calling is within the derived class and will immediately make use of - * the returned object, knowing its real (derived) type. */ virtual std::unique_ptr get_subface_data(const UpdateFlags update_flags,