]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clean up some documentation for user pointers. 17198/head
authorDavid Wells <drwells@email.unc.edu>
Wed, 3 Jul 2024 12:36:18 +0000 (08:36 -0400)
committerDavid Wells <drwells@email.unc.edu>
Wed, 3 Jul 2024 12:36:18 +0000 (08:36 -0400)
include/deal.II/grid/tria_accessor.h

index b8f7dc8e46dcd7cf2d0af5a9c1709e8f77454eaa..ef3cf0e2ace73ad2fe5e140a7f60d8fb948f91d6 100644 (file)
@@ -1356,7 +1356,7 @@ public:
   set_user_pointer(void *p) const;
 
   /**
-   * Reset the user pointer to a @p nullptr pointer. See
+   * Reset the user pointer to `nullptr`. See
    * @ref GlossUserData
    * for more information.
    */
@@ -1365,14 +1365,16 @@ public:
 
   /**
    * Access the value of the user pointer. It is in the responsibility of the
-   * user to make sure that the pointer points to something useful. You should
-   * use the new style cast operator to maintain a minimum of type safety,
-   * e.g.
+   * user to make sure that the pointer points to something useful and always
+   * requires casting to a known type, e.g.,
    *
-   * @note User pointers and user indices are mutually exclusive. Therefore,
-   * you can only use one of them, unless you call
-   * Triangulation::clear_user_data() in between. <tt>A
-   * *a=static_cast<A*>(cell->user_pointer());</tt>.
+   * @code
+   * auto *a = static_cast<A*>(cell->user_pointer());
+   * @endcode
+   *
+   * @note User pointers and user indices are mutually exclusive. Therefore, you
+   * can only use one of them, unless you call Triangulation::clear_user_data()
+   * in between.
    *
    * See
    * @ref GlossUserData
@@ -2680,7 +2682,7 @@ public:
   set_user_pointer(void *p) const;
 
   /**
-   * Reset the user pointer to a @p nullptr pointer. See
+   * Reset the user pointer to `nullptr`. See
    * @ref GlossUserData
    * for more information.
    */

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.