head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC4:1.1.1.11 netbsd-11-0-RC3:1.1.1.11 netbsd-11-0-RC2:1.1.1.11 netbsd-11-0-RC1:1.1.1.11 gcc-14-3-0:1.1.1.12 perseant-exfatfs-base-20250801:1.1.1.11 netbsd-11:1.1.1.11.0.4 netbsd-11-base:1.1.1.11 gcc-12-5-0:1.1.1.11 netbsd-10-1-RELEASE:1.1.1.10 perseant-exfatfs-base-20240630:1.1.1.11 gcc-12-4-0:1.1.1.11 perseant-exfatfs:1.1.1.11.0.2 perseant-exfatfs-base:1.1.1.11 netbsd-8-3-RELEASE:1.1.1.2 netbsd-9-4-RELEASE:1.1.1.4.2.1 netbsd-10-0-RELEASE:1.1.1.10 netbsd-10-0-RC6:1.1.1.10 netbsd-10-0-RC5:1.1.1.10 netbsd-10-0-RC4:1.1.1.10 netbsd-10-0-RC3:1.1.1.10 netbsd-10-0-RC2:1.1.1.10 netbsd-10-0-RC1:1.1.1.10 gcc-12-3-0:1.1.1.11 gcc-10-5-0:1.1.1.10 netbsd-10:1.1.1.10.0.6 netbsd-10-base:1.1.1.10 netbsd-9-3-RELEASE:1.1.1.4.2.1 gcc-10-4-0:1.1.1.10 cjep_sun2x-base1:1.1.1.10 cjep_sun2x:1.1.1.10.0.4 cjep_sun2x-base:1.1.1.10 cjep_staticlib_x-base1:1.1.1.10 netbsd-9-2-RELEASE:1.1.1.4.2.1 cjep_staticlib_x:1.1.1.10.0.2 cjep_staticlib_x-base:1.1.1.10 gcc-10-3-0:1.1.1.10 netbsd-9-1-RELEASE:1.1.1.4.2.1 gcc-9-3-0:1.1.1.9 gcc-7-5-0:1.1.1.7 phil-wifi-20200421:1.1.1.6 phil-wifi-20200411:1.1.1.6 is-mlppp:1.1.1.5.0.2 is-mlppp-base:1.1.1.5 phil-wifi-20200406:1.1.1.6 netbsd-8-2-RELEASE:1.1.1.2 gcc-8-4-0:1.1.1.8 netbsd-9-0-RELEASE:1.1.1.4 netbsd-9-0-RC2:1.1.1.4 netbsd-9-0-RC1:1.1.1.4 phil-wifi-20191119:1.1.1.5 gcc-8-3-0:1.1.1.5 netbsd-9:1.1.1.4.0.2 netbsd-9-base:1.1.1.4 phil-wifi-20190609:1.1.1.4 netbsd-8-1-RELEASE:1.1.1.2 netbsd-8-1-RC1:1.1.1.2 pgoyette-compat-merge-20190127:1.1.1.2.14.2 pgoyette-compat-20190127:1.1.1.4 gcc-7-4-0:1.1.1.4 pgoyette-compat-20190118:1.1.1.3 pgoyette-compat-1226:1.1.1.3 pgoyette-compat-1126:1.1.1.3 gcc-6-5-0:1.1.1.3 pgoyette-compat-1020:1.1.1.2 pgoyette-compat-0930:1.1.1.2 pgoyette-compat-0906:1.1.1.2 netbsd-7-2-RELEASE:1.1.1.1 pgoyette-compat-0728:1.1.1.2 netbsd-8-0-RELEASE:1.1.1.2 phil-wifi:1.1.1.2.0.16 phil-wifi-base:1.1.1.2 pgoyette-compat-0625:1.1.1.2 netbsd-8-0-RC2:1.1.1.2 pgoyette-compat-0521:1.1.1.2 pgoyette-compat-0502:1.1.1.2 pgoyette-compat-0422:1.1.1.2 netbsd-8-0-RC1:1.1.1.2 pgoyette-compat-0415:1.1.1.2 pgoyette-compat-0407:1.1.1.2 pgoyette-compat-0330:1.1.1.2 pgoyette-compat-0322:1.1.1.2 pgoyette-compat-0315:1.1.1.2 netbsd-7-1-2-RELEASE:1.1.1.1 pgoyette-compat:1.1.1.2.0.14 pgoyette-compat-base:1.1.1.2 gcc-6-4-0:1.1.1.2 netbsd-7-1-1-RELEASE:1.1.1.1 gcc-5-5-0:1.1.1.2 matt-nb8-mediatek:1.1.1.2.0.12 matt-nb8-mediatek-base:1.1.1.2 perseant-stdc-iso10646:1.1.1.2.0.10 perseant-stdc-iso10646-base:1.1.1.2 netbsd-8:1.1.1.2.0.8 netbsd-8-base:1.1.1.2 prg-localcount2-base3:1.1.1.2 prg-localcount2-base2:1.1.1.2 prg-localcount2-base1:1.1.1.2 prg-localcount2:1.1.1.2.0.6 prg-localcount2-base:1.1.1.2 pgoyette-localcount-20170426:1.1.1.2 bouyer-socketcan-base1:1.1.1.2 pgoyette-localcount-20170320:1.1.1.2 netbsd-7-1:1.1.1.1.0.14 netbsd-7-1-RELEASE:1.1.1.1 netbsd-7-1-RC2:1.1.1.1 netbsd-7-nhusb-base-20170116:1.1.1.1 bouyer-socketcan:1.1.1.2.0.4 bouyer-socketcan-base:1.1.1.2 pgoyette-localcount-20170107:1.1.1.2 netbsd-7-1-RC1:1.1.1.1 pgoyette-localcount-20161104:1.1.1.2 netbsd-7-0-2-RELEASE:1.1.1.1 localcount-20160914:1.1.1.2 netbsd-7-nhusb:1.1.1.1.0.12 netbsd-7-nhusb-base:1.1.1.1 pgoyette-localcount-20160806:1.1.1.2 pgoyette-localcount-20160726:1.1.1.2 pgoyette-localcount:1.1.1.2.0.2 pgoyette-localcount-base:1.1.1.2 gcc-5-4-0:1.1.1.2 netbsd-7-0-1-RELEASE:1.1.1.1 gcc-5-3-0:1.1.1.2 netbsd-7-0:1.1.1.1.0.10 netbsd-7-0-RELEASE:1.1.1.1 gcc-4-8-5-pre-gcc-old-import:1.1.1.1 netbsd-7-0-RC3:1.1.1.1 netbsd-7-0-RC2:1.1.1.1 post-gcc-4-8-5-merge:1.1.1.1 gcc-4-8-5:1.1.1.1 netbsd-7-0-RC1:1.1.1.1 gcc-4-8-4:1.1.1.1 gcc-4-8-20141009:1.1.1.1 tls-maxphys-base:1.1.1.1 tls-maxphys:1.1.1.1.0.8 netbsd-7:1.1.1.1.0.6 netbsd-7-base:1.1.1.1 gcc-4-8-3:1.1.1.1 yamt-pagecache:1.1.1.1.0.4 yamt-pagecache-base9:1.1.1.1 tls-earlyentropy:1.1.1.1.0.2 tls-earlyentropy-base:1.1.1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1 riastradh-drm2-base3:1.1.1.1 gcc-4-8-3-pre-r208254:1.1.1.1 gcc-4-8-3-pre-r206687:1.1.1.1 FSF:1.1.1; locks; strict; comment @# @; 1.1 date 2014.03.01.08.41.30; author mrg; state Exp; branches 1.1.1.1; next ; commitid TtaB91QNTknAoYqx; 1.1.1.1 date 2014.03.01.08.41.30; author mrg; state Exp; branches 1.1.1.1.4.1 1.1.1.1.8.1; next 1.1.1.2; commitid TtaB91QNTknAoYqx; 1.1.1.2 date 2016.01.24.06.05.43; author mrg; state Exp; branches 1.1.1.2.14.1 1.1.1.2.16.1; next 1.1.1.3; commitid uWWfbLp08zOK79Sy; 1.1.1.3 date 2018.11.04.00.12.37; author mrg; state Exp; branches; next 1.1.1.4; commitid bulspy67pMB6EyYA; 1.1.1.4 date 2019.01.19.10.14.11; author mrg; state Exp; branches 1.1.1.4.2.1; next 1.1.1.5; commitid VQ8OwWIg5RS9kn8B; 1.1.1.5 date 2019.10.01.09.36.13; author mrg; state Exp; branches; next 1.1.1.6; commitid smvgr2IPAQDr89FB; 1.1.1.6 date 2020.03.11.08.15.58; author mrg; state Exp; branches; next 1.1.1.7; commitid AhKhCnGPUZgytXZB; 1.1.1.7 date 2020.08.11.05.10.39; author mrg; state Exp; branches; next 1.1.1.8; commitid 5dBRDT7i6e65xBjC; 1.1.1.8 date 2020.08.11.05.30.16; author mrg; state Exp; branches; next 1.1.1.9; commitid 7AI4OfpLi4eqEBjC; 1.1.1.9 date 2020.09.05.07.52.18; author mrg; state Exp; branches; next 1.1.1.10; commitid ZRYA7IOuwfMjAPmC; 1.1.1.10 date 2021.04.10.22.10.05; author mrg; state Exp; branches; next 1.1.1.11; commitid eC4g0MRpqTvEkNOC; 1.1.1.11 date 2023.07.30.05.21.21; author mrg; state Exp; branches; next 1.1.1.12; commitid tk6nV4mbc9nVEMyE; 1.1.1.12 date 2025.09.13.23.45.49; author mrg; state Exp; branches; next ; commitid KwhwN4krNWa6XBaG; 1.1.1.1.4.1 date 2014.03.01.08.41.30; author yamt; state dead; branches; next 1.1.1.1.4.2; commitid DX8bafDLmqEbpyBx; 1.1.1.1.4.2 date 2014.05.22.16.37.45; author yamt; state Exp; branches; next ; commitid DX8bafDLmqEbpyBx; 1.1.1.1.8.1 date 2014.03.01.08.41.30; author tls; state dead; branches; next 1.1.1.1.8.2; commitid jTnpym9Qu0o4R1Nx; 1.1.1.1.8.2 date 2014.08.19.23.54.46; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.1.1.2.14.1 date 2018.11.26.01.50.57; author pgoyette; state Exp; branches; next 1.1.1.2.14.2; commitid Zj4q5SspGdKXto1B; 1.1.1.2.14.2 date 2019.01.26.21.59.32; author pgoyette; state Exp; branches; next ; commitid JKpcmvSjdT25dl9B; 1.1.1.2.16.1 date 2019.06.10.21.54.48; author christos; state Exp; branches; next 1.1.1.2.16.2; commitid jtc8rnCzWiEEHGqB; 1.1.1.2.16.2 date 2020.04.08.14.06.37; author martin; state Exp; branches; next 1.1.1.2.16.3; commitid Qli2aW9E74UFuA3C; 1.1.1.2.16.3 date 2020.04.13.07.58.34; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; 1.1.1.4.2.1 date 2020.08.14.10.45.31; author martin; state Exp; branches; next ; commitid N4xCrirfb6ezh1kC; desc @@ 1.1 log @Initial revision @ text @ Writing and Generating Documentation

Writing and Generating Documentation

Introduction

Documentation for the GNU C++ Library is created from three independent sources: a manual, a FAQ, and an API reference.

The sub-directory doc within the main source directory contains Makefile.am and Makefile.in, which provide rules for generating documentation, described in excruciating detail below. The doc sub-directory also contains three directories: doxygen, which contains scripts and fragments for doxygen, html, which contains an html version of the manual, and xml, which contains an xml version of the manual.

Diverging from established documentation conventions in the rest of the GCC project, libstdc++ does not use Texinfo as a markup language. Instead, Docbook is used to create the manual and the FAQ, and Doxygen is used to construct the API reference. Although divergent, this conforms to the GNU Project recommendations as long as the output is of sufficient quality, as per GNU Manuals.

Generating Documentation

Certain Makefile rules are required by the GNU Coding Standards. These standard rules generate HTML, PDF, XML, or man files. For each of the generative rules, there is an additional install rule that is used to install any generated documentation files into the prescribed installation directory. Files are installed into share/doc or share/man directories.

The standard Makefile rules are conditionally supported, based on the results of examining the host environment for prerequisites at configuration time. If requirements are not found, the rule is aliased to a dummy rule that does nothing, and produces no documentation. If the requirements are found, the rule forwards to a private rule that produces the requested documentation.

For more details on what prerequisites were found and where, please consult the file config.log in the libstdc++ build directory. Compare this log to what is expected for the relevant Makefile conditionals: BUILD_INFO, BUILD_XML, BUILD_HTML, BUILD_MAN, BUILD_PDF, and BUILD_EPUB.

Supported Makefile rules:

make html , make install-html

Generates multi-page HTML documentation, and installs it in the following directories:

doc/libstdc++/libstdc++-api.html

doc/libstdc++/libstdc++-manual.html

make pdf , make install-pdf

Generates indexed PDF documentation, and installs it as the following files:

doc/libstdc++/libstdc++-api.pdf

doc/libstdc++/libstdc++-manual.pdf

make man , make install-man

Generates man pages, and installs it in the following directory:

man/man3/

The generated man pages are namespace-qualified, so to look at the man page for vector, one would use man std::vector.

make epub , make install-epub

Generates documentation in the ebook/portable electronic reader format called Epub, and installs it as the following file.

doc/libstdc++/libstdc++-manual.epub

make xml , make install-xml

Generates single-file XML documentation, and installs it as the following files:

doc/libstdc++/libstdc++-api-single.xml

doc/libstdc++/libstdc++-manual-single.xml

Makefile rules for several other formats are explicitly not supported, and are always aliased to dummy rules. These unsupported formats are: info, ps, and dvi.

Doxygen

Prerequisites

Table B.1. Doxygen Prerequisites

ToolVersionRequired By
coreutils8.5all
bash4.1all
doxygen1.7.6.1all
graphviz2.26graphical hierarchies
pdflatex2007-59pdf output

Prerequisite tools are Bash 2.0 or later, Doxygen, and the GNU coreutils. (GNU versions of find, xargs, and possibly sed and grep are used, just because the GNU versions make things very easy.)

To generate the pretty pictures and hierarchy graphs, the Graphviz package will need to be installed. For PDF output, pdflatex is required.

Be warned the PDF file generated via doxygen is extremely large. At last count, the PDF file is over three thousand pages. Generating this document taxes the underlying TeX formatting system, and will require the expansion of TeX's memory capacity. Specifically, the pool_size variable in the configuration file texmf.cnf may need to be increased by a minimum factor of two.

Generating the Doxygen Files

The following Makefile rules run Doxygen to generate HTML docs, XML docs, XML docs as a single file, PDF docs, and the man pages. These rules are not conditional! If the required tools are not found, or are the wrong versions, the rule may end in an error.

make doc-html-doxygen

make doc-xml-doxygen

make doc-xml-single-doxygen

make doc-pdf-doxygen

make doc-man-doxygen

Generated files are output into separate sub directories of doc/doxygen/ in the build directory, based on the output format. For instance, the HTML docs will be in doc/doxygen/html.

Careful observers will see that the Makefile rules simply call a script from the source tree, run_doxygen, which does the actual work of running Doxygen and then (most importantly) massaging the output files. If for some reason you prefer to not go through the Makefile, you can call this script directly. (Start by passing --help.)

If you wish to tweak the Doxygen settings, do so by editing doc/doxygen/user.cfg.in. Notes to fellow library hackers are written in triple-# comments.

Debugging Generation

Sometimes, mis-configuration of the pre-requisite tools can lead to errors when attempting to build the documentation. Here are some of the obvious errors, and ways to fix some common issues that may appear quite cryptic.

First, if using a rule like make pdf, try to narrow down the scope of the error to either docbook (make doc-pdf-docbook) or doxygen (make doc-pdf-doxygen).

Working on the doxygen path only, closely examine the contents of the following build directory: build/target/libstdc++-v3/doc/doxygen/latex. Pay attention to three files enclosed within, annotated as follows.

  • refman.tex

    The actual latex file, or partial latex file. This is generated via doxygen, and is the LaTeX version of the Doxygen XML file libstdc++-api.xml. Go to a specific line, and look at the genrated LaTeX, and try to deduce what markup in libstdc++-api.xml is causing it.

  • refman.out

    A log of the compilation of the converted LaTeX form to pdf. This is a linear list, from the beginning of the refman.tex file: the last entry of this file should be the end of the LaTeX file. If it is truncated, then you know that the last entry is the last part of the generated LaTeX source file that is valid. Often this file contains an error with a specific line number of refman.tex that is incorrect, or will have clues at the end of the file with the dump of the memory usage of LaTeX.

If the error at hand is not obvious after examination, a fall-back strategy is to start commenting out the doxygen input sources, which can be found in doc/doxygen/user.cfg.in, look for the INPUT tag. Start by commenting out whole directories of header files, until the offending header is identified. Then, read the latex log files to try and find surround text, and look for that in the offending header.

Markup

In general, libstdc++ files should be formatted according to the rules found in the Coding Standard. Before any doxygen-specific formatting tweaks are made, please try to make sure that the initial formatting is sound.

Adding Doxygen markup to a file (informally called doxygenating) is very simple. The Doxygen manual can be found here. We try to use a very-recent version of Doxygen.

For classes, use deque/vector/list and std::pair as examples. For functions, see their member functions, and the free functions in stl_algobase.h. Member functions of other container-like types should read similarly to these member functions.

Some commentary to accompany the first list in the Special Documentation Blocks section of the Doxygen manual:

  1. For longer comments, use the Javadoc style...

  2. ...not the Qt style. The intermediate *'s are preferred.

  3. Use the triple-slash style only for one-line comments (the brief mode).

  4. This is disgusting. Don't do this.

Some specific guidelines:

Use the @@-style of commands, not the !-style. Please be careful about whitespace in your markup comments. Most of the time it doesn't matter; doxygen absorbs most whitespace, and both HTML and *roff are agnostic about whitespace. However, in <pre> blocks and @@code/@@endcode sections, spacing can have interesting effects.

Use either kind of grouping, as appropriate. doxygroups.cc exists for this purpose. See stl_iterator.h for a good example of the other kind of grouping.

Please use markup tags like @@p and @@a when referring to things such as the names of function parameters. Use @@e for emphasis when necessary. Use @@c to refer to other standard names. (Examples of all these abound in the present code.)

Complicated math functions should use the multi-line format. An example from random.h:


/**
 * @@brief A model of a linear congruential random number generator.
 *
 * @@f[
 *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m
 * @@f]
 */

One area of note is the markup required for @@file markup in header files. Two details are important: for filenames that have the same name in multiple directories, include part of the installed path to disambiguate. For example:


/** @@file debug/vector
 *  This file is a GNU debug extension to the Standard C++ Library.
 */

The other relevant detail for header files is the use of a libstdc++-specific doxygen alias that helps distinguish between public header files (like random) from implementation or private header files (like bits/c++config.h.) This alias is spelled @@headername and can take one or two arguments that detail the public header file or files that should be included to use the contents of the file. All header files that are not intended for direct inclusion must use headername in the file block. An example:


/** @@file bits/basic_string.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @@headername{string}
 */

Be careful about using certain, special characters when writing Doxygen comments. Single and double quotes, and separators in filenames are two common trouble spots. When in doubt, consult the following table.

Table B.2. HTML to Doxygen Markup Comparison

HTMLDoxygen
\\\
"\"
'\'
<i>@@a word
<b>@@b word
<code>@@c word
<em>@@a word
<em><em>two words or more</em>

Docbook

Prerequisites

Table B.3. Docbook Prerequisites

ToolVersionRequired By
docbook5-style-xsl1.76.1all
xsltproc1.1.26all
xmllint2.7.7validation
dblatex0.3pdf output
pdflatex2007-59pdf output
docbook2X0.8.8info output
epub3 stylesheetsb3epub output

Editing the DocBook sources requires an XML editor. Many exist: some notable options include emacs, Kate, or Conglomerate.

Some editors support special XML Validation modes that can validate the file as it is produced. Recommended is the nXML Mode for emacs.

Besides an editor, additional DocBook files and XML tools are also required.

Access to the DocBook 5.0 stylesheets and schema is required. The stylesheets are usually packaged by vendor, in something like docbook5-style-xsl. To exactly match generated output, please use a version of the stylesheets equivalent to docbook5-style-xsl-1.75.2-3. The installation directory for this package corresponds to the XSL_STYLE_DIR in doc/Makefile.am and defaults to /usr/share/sgml/docbook/xsl-ns-stylesheets.

For processing XML, an XSLT processor and some style sheets are necessary. Defaults are xsltproc provided by libxslt.

For validating the XML document, you'll need something like xmllint and access to the relevant DocBook schema. These are provided by a vendor package like libxml2 and docbook5-schemas-5.0-4

For PDF output, something that transforms valid Docbook XML to PDF is required. Possible solutions include dblatex, xmlto, or prince. Of these, dblatex is the default. Other options are listed on the DocBook web pages. Please consult the list when preparing printed manuals for current best practice and suggestions.

For Texinfo output, something that transforms valid Docbook XML to Texinfo is required. The default choice is docbook2X.

For epub output, the stylesheets for EPUB3 are required. These stylesheets are still in development. To validate the created file, epubcheck is necessary.

Generating the DocBook Files

The following Makefile rules generate (in order): an HTML version of all the DocBook documentation, a PDF version of the same, and a single XML document. These rules are not conditional! If the required tools are not found, or are the wrong versions, the rule may end in an error.

make doc-html-docbook

make doc-pdf-docbook

make doc-xml-single-docbook

Generated files are output into separate sub directores of doc/docbook/ in the build directory, based on the output format. For instance, the HTML docs will be in doc/docbook/html.

If the Docbook stylesheets are installed in a custom location, one can use the variable XSL_STYLE_DIR to override the Makefile defaults. For example:

	
make XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwalsh" doc-html-docbook
	
      

Debugging Generation

Sometimes, mis-configuration of the pre-requisite tools can lead to errors when attempting to build the documentation. Here are some of the obvious errors, and ways to fix some common issues that may appear quite cryptic.

First, if using a rule like make pdf, try to narrow down the scope of the error to either docbook (make doc-pdf-docbook) or doxygen (make doc-pdf-doxygen).

Working on the docbook path only, closely examine the contents of the following build directory: build/target/libstdc++-v3/doc/docbook/latex. Pay attention to three files enclosed within, annotated as follows.

  • spine.tex

    The actual latex file, or partial latex file. This is generated via dblatex, and is the LaTeX version of the DocBook XML file spine.xml. Go to a specific line, and look at the genrated LaTeX, and try to deduce what markup in spine.xml is causing it.

  • spine.out

    A log of the conversion from the XML form to the LaTeX form. This is a linear list, from the beginning of the spine.xml file: the last entry of this file should be the end of the DocBook file. If it is truncated, then you know that the last entry is the last part of the XML source file that is valid. The error is after this point.

  • spine.log

    A log of the compilation of the converted LaTeX form to pdf. This is a linear list, from the beginning of the spine.tex file: the last entry of this file should be the end of the LaTeX file. If it is truncated, then you know that the last entry is the last part of the generated LaTeX source file that is valid. Often this file contains an error with a specific line number of spine.tex that is incorrect.

If the error at hand is not obvious after examination, or if one encounters the inscruitable Incomplete \ifmmode error, a fall-back strategy is to start commenting out parts of the XML document (regardless of what this does to over-all document validity). Start by commenting out each of the largest parts of the spine.xml file, section by section, until the offending section is identified.

Editing and Validation

After editing the xml sources, please make sure that the XML documentation and markup is still valid. This can be done easily, with the following validation rule:

	make doc-xml-validate-docbook
      

This is equivalent to doing:

	
	  xmllint --noout --valid xml/index.xml
	
      

Please note that individual sections and chapters of the manual can be validated by substituting the file desired for xml/index.xml in the command above. Reducing scope in this manner can be helpful when validation on the entire manual fails.

All Docbook xml sources should always validate. No excuses!

File Organization and Basics


      Which files are important

      All Docbook files are in the directory
      libstdc++-v3/doc/xml

      Inside this directory, the files of importance:
      spine.xml   - index to documentation set
      manual/spine.xml  - index to manual
      manual/*.xml   - individual chapters and sections of the manual
      faq.xml   - index to FAQ
      api.xml   - index to source level / API

      All *.txml files are template xml files, i.e., otherwise empty files with
      the correct structure, suitable for filling in with new information.

      Canonical Writing Style

      class template
      function template
      member function template
      (via C++ Templates, Vandevoorde)

      class in namespace std: allocator, not std::allocator

      header file: iostream, not <iostream>


      General structure

      <set>
      <book>
      </book>

      <book>
      <chapter>
      </chapter>
      </book>

      <book>
      <part>
      <chapter>
      <section>
      </section>

      <sect1>
      </sect1>

      <sect1>
      <sect2>
      </sect2>
      </sect1>
      </chapter>

      <chapter>
      </chapter>
      </part>
      </book>

      </set>
    

Markup By Example

Complete details on Docbook markup can be found in the DocBook Element Reference, online. An incomplete reference for HTML to Docbook conversion is detailed in the table below.

Table B.4. HTML to Docbook XML Markup Comparison

HTMLDocbook
<p><para>
<pre><computeroutput>, <programlisting>, <literallayout>
<ul><itemizedlist>
<ol><orderedlist>
<il><listitem>
<dl><variablelist>
<dt><term>
<dd><listitem>
<a href=""><ulink url="">
<code><literal>, <programlisting>
<strong><emphasis>
<em><emphasis>
"<quote>

And examples of detailed markup for which there are no real HTML equivalents are listed in the table below.

Table B.5. Docbook XML Element Use

ElementUse
<structname><structname>char_traits</structname>
<classname><classname>string</classname>
<function>

<function>clear()</function>

<function>fs.clear()</function>

<type><type>long long</type>
<varname><varname>fs</varname>
<literal>

<literal>-Weffc++</literal>

<literal>rel_ops</literal>

<constant>

<constant>_GNU_SOURCE</constant>

<constant>3.0</constant>

<command><command>g++</command>
<errortext><errortext>In instantiation of</errortext>
<filename>

<filename class="headerfile">ctype.h</filename>

<filename class="directory">/home/gcc/build</filename>

<filename class="libraryfile">libstdc++.so</filename>


@ 1.1.1.1 log @import GCC 4.8 branch at r206687. highlights from: http://gcc.gnu.org/gcc-4.6/changes.html GCC now has stricter checks for invalid command-line options New -Wunused-but-set-variable and -Wunused-but-set-parameter warnings Many platforms have been obsoleted Link-time optimization improvements A new switch -fstack-usage has been added A new function attribute leaf was introduced A new warning, enabled by -Wdouble-promotion Support for selectively enabling and disabling warnings via #pragma GCC diagnostic has been added There is now experimental support for some features from the upcoming C1X revision of the ISO C standard Improved experimental support for the upcoming C++0x ISO C++ standard G++ now issues clearer diagnostics in several cases Updates for ARM, x86, MIPS, PPC/PPC64, SPARC Darwin, FreeBSD, Solaris 2, MinGW and Cygwin now all support __float128 on 32-bit and 64-bit x86 targets. [*1] highlights from: http://gcc.gnu.org/gcc-4.7/changes.html The -fconserve-space flag has been deprecated Support for a new parameter --param case-values-threshold=n was added Interprocedural and Link-time optimization improvements A new built-in, __builtin_assume_aligned, has been added A new warning option -Wunused-local-typedefs was added A new experimental command-line option -ftrack-macro-expansion was added Support for atomic operations specifying the C++11/C11 memory model has been added There is support for some more features from the C11 revision of the ISO C standard Improved experimental support for the new ISO C++ standard, C++11 Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE* A new option (-grecord-gcc-switches) was added highlights from: http://gcc.gnu.org/gcc-4.8/changes.html GCC now uses C++ as its implementation language. This means that to build GCC from sources, you will need a C++ compiler that understands C++ 2003 DWARF4 is now the default when generating DWARF debug information A new general optimization level, -Og, has been introduced A new option -ftree-partial-pre was added The option -fconserve-space has been removed The command-line options -fipa-struct-reorg and -fipa-matrix-reorg have been removed Interprocedural and Link-time optimization improvements AddressSanitizer, a fast memory error detector, has been added [*2] A new -Wsizeof-pointer-memaccess warning has been added G++ now supports a -std=c++1y option for experimentation with features proposed for the next revision of the standard, expected around 2014 Improved experimental support for the new ISO C++ standard, C++11 A new port has been added to support AArch64 Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE* [*1] we should support this too! [*2] we should look into this. https://code.google.com/p/address-sanitizer/ @ text @@ 1.1.1.2 log @import GCC 5.3.0. see these urls for details which are too large to include here: http://gcc.gnu.org/gcc-4.9/changes.html http://gcc.gnu.org/gcc-5/changes.html (note that GCC 5.x is a release stream like GCC 4.9.x, 4.8.x, etc.) the main issues we will have are: The default mode for C is now -std=gnu11 instead of -std=gnu89. ARM: The deprecated option -mwords-little-endian has been removed. The options -mapcs, -mapcs-frame, -mtpcs-frame and -mtpcs-leaf-frame which are only applicable to the old ABI have been deprecated. MIPS: The o32 ABI has been modified and extended. The o32 64-bit floating-point register support is now obsolete and has been removed. It has been replaced by three ABI extensions FPXX, FP64A, and FP64. The meaning of the -mfp64 command-line option has changed. It is now used to enable the FP64A and FP64 ABI extensions. @ text @d115 1 a115 1

Doxygen

Prerequisites

Table B.1. Doxygen Prerequisites

ToolVersionRequired By
coreutils8.5all
bash4.1all
doxygen1.7.6.1all
graphviz2.26graphical hierarchies
pdflatex2007-59pdf output

d128 1 a128 3 pdflatex is required as well as a number of TeX packages such as texlive-xtab and texlive-tocloft. d181 2 a182 1 contents of the following build directory: build/target/libstdc++-v3/doc/doxygen/latex. d190 1 a190 1 line, and look at the generated LaTeX, and try to deduce what a192 12 refman.log

A log created by latex as it processes the refman.tex file. If generating the PDF fails look at the end of this file for errors such as:

    ! LaTeX Error: File `xtab.sty' not found.
    

This indicates a required TeX package is missing. For the example above the texlive-xtab package needs to be installed.

  • d195 1 a195 1 A log of the compilation of the converted LaTeX form to PDF. This d230 3 a232 3 in stl_algobase.h. Member functions of other container-like types should read similarly to these member functions. d256 2 a257 2 purpose. See stl_iterator.h for a good example of the other kind of grouping. d264 2 a265 2 Complicated math functions should use the multi-line format. An example from random.h: d312 1 a312 1

    Table B.2. HTML to Doxygen Markup Comparison

    HTMLDoxygen
    \\\
    "\"
    '\'
    <i>@@a word
    <b>@@b word
    <code>@@c word
    <em>@@a word
    <em><em>two words or more</em>

  • Docbook

    Prerequisites

    Table B.3. Docbook Prerequisites

    ToolVersionRequired By
    docbook5-style-xsl1.76.1all
    xsltproc1.1.26all
    xmllint2.7.7validation
    dblatex0.3pdf output
    pdflatex2007-59pdf output
    docbook2X0.8.8info output
    epub3 stylesheetsb3epub output

    d405 1 a405 1 line, and look at the generated LaTeX, and try to deduce what d522 1 a522 1

    Table B.4. HTML to Docbook XML Markup Comparison

    HTMLDocbook
    <p><para>
    <pre><computeroutput>, <programlisting>, d526 1 a526 1

    Table B.5. Docbook XML Element Use

    ElementUse
    <structname><structname>char_traits</structname>
    <classname><classname>string</classname>
    <function> @ 1.1.1.2.16.1 log @Sync with HEAD @ text @d2 1 a2 1 Writing and Generating Documentation