CGAL: About namespace internal (#8896)

## Summary of Changes

The Developer Manual recommends `namespace CGAL::internal::Pkg`, whereas
we have decided that it must be `namespace CGAL::Pkg::internal`. See
also Issue #257

## Release Management

* Affected package(s): Developer Manual
This commit is contained in:
Sebastien Loriot 2025-05-26 10:18:40 +02:00 committed by GitHub
commit 5833ff311c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 15 deletions

View File

@ -13,19 +13,31 @@ but the better alternative is the usage of `namespace`.
\section Developer_manualNamespaceCGAL Namespace CGAL \section Developer_manualNamespaceCGAL Namespace CGAL
All names introduced by \cgal should be in namespace `CGAL`, <I>e.g.</I>: All names introduced by \cgal should be in namespace `CGAL`, or in a subnamespace
corresponding to a package, <I>e.g.</I>:
\code{.cpp} \code{.cpp}
#include <something> #include <something>
namespace CGAL { namespace CGAL {
class My_new_cgal_class {}; /*!
* This class ...
*/
class Foo {};
My_new_cgal_class
my_new_function( My_new_cgal_class& );
namespace Polygon_mesh_processing {
/*!
* modifies `f` by ...
*/
void
bar( foo & f);
} // namespace Polygon_mesh_processing
} // namespace CGAL } // namespace CGAL
\endcode \endcode
Make sure not to have include statements inside the Make sure not to have include statements inside the
`namespace CGAL`. Otherwise, all names defined in the file included will be `namespace CGAL`. Otherwise, all names defined in the file included will be
added to the namespace. added to the namespace.
@ -35,19 +47,15 @@ added to the namespace.
All names introduced by \cgal which are not documented to the user All names introduced by \cgal which are not documented to the user
should be under an `internal` subnamespace of `CGAL`, <I>e.g.</I>: should be under an `internal` subnamespace of `CGAL`, <I>e.g.</I>:
\code{.cpp} \code{.cpp}
namespace CGAL { namespace internal { namespace CGAL {
namespace Polygon_mesh_processing {
namespace internal {
class My_undocumented_class {}; class Baz_used_by_foo {};
void my_new_function( My_undocumented_class& ); } // namespace internal
} // namespace Polygon_mesh_processing
}} // namespace CGAL::internal } // namespace CGAL
namespace CGAL { namespace internal { namespace Package { namespace tags {
class Some_further_class_local_to_Package;
}}}} // namespace CGAL::internal::Package::tags
\endcode \endcode
\section Developer_manualNoteonglobaltemplatefunctions Note on global template functions \section Developer_manualNoteonglobaltemplatefunctions Note on global template functions