cgal/Manual/doc_tex/Introduction_ref/namespace_cgal.tex

13 lines
830 B
TeX

\section{Namespace \texttt{CGAL}}
All names introduced by \cgal, especially those documented in these manuals,
are in a namespace called \ccc{CGAL}, which is in global
scope.\footnote{Removing prefix \ccc{CGAL_} and introducing namespace
\ccc{CGAL} is the major difference between releases 1.2 and 2.0.}
A user can either qualify names from \cgal\ by adding \ccc{CGAL::} to the name,
\textit{e.g.},\ \ccc{CGAL::Point_2< CGAL::Homogeneous< int> >}; making a
single name from \cgal\ visible in a scope via a \ccc{using} statement,
\textit{e.g.}, \ccc{using CGAL::Cartesian;}, and then use this name
unqualified in this scope; or making all names from namespace \ccc{CGAL}
visible in a scope with \ccc{using namespace CGAL;}. The latter, however, is
likely to give rise to name conflicts and is therefore not recommended.