11.. highlight :: rst
22
3+ ==============
34The C++ Domain
4- --------------
5+ ==============
56
67The C++ domain (name **cpp **) supports documenting C++ projects.
78
89Directives for Declaring Entities
9- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10+ ---------------------------------
1011
1112The following directives are available. All declarations can start with a
1213visibility statement (``public ``, ``private `` or ``protected ``).
@@ -247,7 +248,7 @@ visibility statement (``public``, ``private`` or ``protected``).
247248
248249
249250Options
250- ^^^^^^^
251+ ~~~~~~~
251252
252253Some directives support options:
253254
@@ -258,7 +259,7 @@ Some directives support options:
258259 .. versionadded :: 1.6
259260
260261Anonymous Entities
261- ~~~~~~~~~~~~~~~~~~
262+ ------------------
262263
263264C++ supports anonymous namespaces, classes, enums, and unions.
264265For the sake of documentation they must be given some name that starts with
@@ -304,7 +305,7 @@ Explicit ref: :cpp:var:`Data::@data::a`. Short-hand ref: :cpp:var:`Data::a`.
304305
305306
306307Aliasing Declarations
307- ~~~~~~~~~~~~~~~~~~~~~
308+ ---------------------
308309
309310Sometimes it may be helpful list declarations elsewhere than their main
310311documentation, e.g., when creating a synopsis of a class interface.
@@ -359,7 +360,7 @@ The following directive can be used for this purpose.
359360
360361
361362 Constrained Templates
362- ~~~~~~~~~~~~~~~~~~~~~
363+ ---------------------
363364
364365.. warning :: The support for concepts is experimental. It is based on the
365366 current draft standard and the Concepts Technical Specification.
@@ -368,7 +369,7 @@ Constrained Templates
368369.. note :: Sphinx does not currently support ``requires`` clauses.
369370
370371Placeholders
371- ^^^^^^^^^^^^
372+ ~~~~~~~~~~~~
372373
373374Declarations may use the name of a concept to introduce constrained template
374375parameters, or the keyword ``auto `` to introduce unconstrained template
@@ -384,7 +385,7 @@ parameters::
384385 Iterator concept.
385386
386387Template Introductions
387- ^^^^^^^^^^^^^^^^^^^^^^
388+ ~~~~~~~~~~~~~~~~~~~~~~
388389
389390Simple constrained function or class templates can be declared with a `template
390391introduction ` instead of a template parameter list::
@@ -419,7 +420,7 @@ compatibility. E.g., ``Iterator{A, B, C}`` will be accepted as an introduction
419420even though it would not be valid C++.
420421
421422Inline Expressions and Types
422- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
423+ ----------------------------
423424
424425.. rst :role :: cpp:expr
425426 cpp:texpr
@@ -458,7 +459,7 @@ Inline Expressions and Types
458459 The :rst:role: `cpp:texpr ` role.
459460
460461Namespacing
461- ~~~~~~~~~~~
462+ -----------
462463
463464Declarations in the C++ domain are as default placed in global scope. The
464465current scope can be changed using three namespace directives. They manage a
@@ -544,7 +545,7 @@ The ``cpp:namespace-pop`` directive undoes the most recent
544545 .. versionadded :: 1.4
545546
546547Info field lists
547- ~~~~~~~~~~~~~~~~~
548+ ----------------
548549
549550All the C++ directives for declaring entities support the following
550551info fields (see also :ref: `info-field-lists `):
@@ -566,7 +567,7 @@ following fields:
566567.. _cpp-roles :
567568
568569Cross-referencing
569- ~~~~~~~~~~~~~~~~~
570+ -----------------
570571
571572These roles link to the given declaration types:
572573
@@ -602,14 +603,14 @@ These roles link to the given declaration types:
602603 angle brackets do not need escaping.
603604
604605Declarations without template parameters and template arguments
605- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
606+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
606607
607608For linking to non-templated declarations the name must be a nested name, e.g.,
608609``f `` or ``MyClass::f ``.
609610
610611
611612Overloaded (member) functions
612- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
613+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
613614
614615When a (member) function is referenced using just its name, the reference
615616will point to an arbitrary matching overload.
@@ -643,7 +644,7 @@ does not influence specific overload references.
643644
644645
645646Templated declarations
646- ^^^^^^^^^^^^^^^^^^^^^^
647+ ~~~~~~~~~~~~~~~~~~~~~~
647648
648649Assume the following declarations.
649650
@@ -680,7 +681,7 @@ This means the following references work as well:
680681 (:cpp:class: `template\< typename TInner> Wrapper::Outer::Inner `)
681682
682683(Full) Template Specialisations
683- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
684+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
684685
685686Assume the following declarations.
686687
@@ -709,7 +710,7 @@ shorthand the empty template parameter list can be omitted, e.g.,
709710(:cpp:class: `Outer\< int>::Inner\< bool> `).
710711
711712Partial Template Specialisations
712- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
713+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
713714
714715Assume the following declaration.
715716
@@ -722,6 +723,6 @@ parameter lists, e.g., ``template\<typename T> Outer\<T*>``
722723succeed if the template parameter identifiers are equal strings.
723724
724725Configuration Variables
725- ~~~~~~~~~~~~~~~~~~~~~~~
726+ -----------------------
726727
727728See :ref: `cpp-config `.
0 commit comments