]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mapping: remove some comments on covariant returns. 18602/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 30 Jun 2025 13:32:47 +0000 (09:32 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 30 Jun 2025 13:33:35 +0000 (09:33 -0400)
This isn't relevant anymore since we use smart pointers as covariant
return may only be used with plain pointers and references.

include/deal.II/fe/mapping.h

index 082e89a90c10eadb88e3e73c07cb72f549afc524..4ead3644a7c089d5ed1272a4211b39a9863d9718 100644 (file)
@@ -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 <i>derived</i> 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<InternalDataBase>
   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 <i>derived</i> 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<InternalDataBase>
   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 <i>derived</i> 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<InternalDataBase>
   get_subface_data(const UpdateFlags          update_flags,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.