Commit 03a32789 by Benjamin Kosnik Committed by Benjamin Kosnik

faq.xml: Adjust structure for pdf index.

2010-02-24  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/faq.xml: Adjust structure for pdf index.
	* doc/xml/manual/mt_allocator.xml: Same.
	* doc/xml/manual/allocator.xml: Same.
	* doc/xml/manual/ctype.xml: Same.
	* doc/xml/manual/numerics.xml: Same.
	* doc/xml/manual/codecvt.xml: Same.
	* doc/xml/manual/intro.xml: Same.
	* doc/xml/manual/shared_ptr.xml: Same.
	* doc/xml/manual/status_cxxtr1.xml: Same.
	* doc/xml/manual/auto_ptr.xml: Same.
	* doc/xml/manual/internals.xml: Same.
	* doc/xml/manual/status_cxx1998.xml: Same.
	* doc/xml/manual/parallel_mode.xml: Same.
	* doc/xml/manual/profile_mode.xml: Same.
	* doc/xml/manual/containers.xml: Same.
	* doc/xml/manual/io.xml: Same.
	* doc/xml/manual/concurrency_extensions.xml: Same.
	* doc/xml/manual/appendix_porting.xml: Same.
	* doc/xml/manual/utilities.xml: Same.
	* doc/xml/manual/support.xml: Same.
	* doc/xml/manual/bitmap_allocator.xml: Same.
	* doc/xml/manual/configure.xml: Same.
	* doc/xml/manual/build_hacking.xml: Same.
	* doc/xml/manual/evolution.xml: Same.
	* doc/xml/manual/using.xml: Same.
	* doc/xml/manual/debug.xml: Same.
	* doc/xml/manual/localization.xml: Same.
	* doc/xml/manual/strings.xml: Same.
	* doc/xml/manual/debug_mode.xml: Same.
	* doc/xml/manual/locale.xml: Same.
	* doc/xml/manual/extensions.xml: Same.
	* doc/xml/manual/appendix_contributing.xml: Same.
	* doc/xml/manual/prerequisites.xml: Same.
	* doc/xml/manual/messages.xml: Same.
	* doc/xml/manual/diagnostics.xml: Same.
	* doc/xml/manual/algorithms.xml: Same.
	* doc/xml/manual/appendix_free.xml: Same.
	* doc/xml/manual/iterators.xml: Same.
	* doc/xml/manual/spine.xml: Same.
	* doc/xml/manual/status_cxxtr24733.xml: Same.
	* doc/xml/manual/status_cxx200x.xml: Same.
	* doc/Makefile.am: Refactor.
	* doc/Makefile.in: Regenerate.

	* include/bits/c++0x_warning.h: Tweak doxygen file markup.

From-SVN: r157059
parent 72c2ffd3
2010-02-24 Benjamin Kosnik <bkoz@redhat.com>
* doc/xml/faq.xml: Adjust structure for pdf index.
* doc/xml/manual/mt_allocator.xml: Same.
* doc/xml/manual/allocator.xml: Same.
* doc/xml/manual/ctype.xml: Same.
* doc/xml/manual/numerics.xml: Same.
* doc/xml/manual/codecvt.xml: Same.
* doc/xml/manual/intro.xml: Same.
* doc/xml/manual/shared_ptr.xml: Same.
* doc/xml/manual/status_cxxtr1.xml: Same.
* doc/xml/manual/auto_ptr.xml: Same.
* doc/xml/manual/internals.xml: Same.
* doc/xml/manual/status_cxx1998.xml: Same.
* doc/xml/manual/parallel_mode.xml: Same.
* doc/xml/manual/profile_mode.xml: Same.
* doc/xml/manual/containers.xml: Same.
* doc/xml/manual/io.xml: Same.
* doc/xml/manual/concurrency_extensions.xml: Same.
* doc/xml/manual/appendix_porting.xml: Same.
* doc/xml/manual/utilities.xml: Same.
* doc/xml/manual/support.xml: Same.
* doc/xml/manual/bitmap_allocator.xml: Same.
* doc/xml/manual/configure.xml: Same.
* doc/xml/manual/build_hacking.xml: Same.
* doc/xml/manual/evolution.xml: Same.
* doc/xml/manual/using.xml: Same.
* doc/xml/manual/debug.xml: Same.
* doc/xml/manual/localization.xml: Same.
* doc/xml/manual/strings.xml: Same.
* doc/xml/manual/debug_mode.xml: Same.
* doc/xml/manual/locale.xml: Same.
* doc/xml/manual/extensions.xml: Same.
* doc/xml/manual/appendix_contributing.xml: Same.
* doc/xml/manual/prerequisites.xml: Same.
* doc/xml/manual/messages.xml: Same.
* doc/xml/manual/diagnostics.xml: Same.
* doc/xml/manual/algorithms.xml: Same.
* doc/xml/manual/appendix_free.xml: Same.
* doc/xml/manual/iterators.xml: Same.
* doc/xml/manual/spine.xml: Same.
* doc/xml/manual/status_cxxtr24733.xml: Same.
* doc/xml/manual/status_cxx200x.xml: Same.
* doc/Makefile.am: Refactor.
* doc/Makefile.in: Regenerate.
* include/bits/c++0x_warning.h: Tweak doxygen file markup.
2010-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2010-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/ext/new_allocator/deallocate_global.cc: Require * testsuite/ext/new_allocator/deallocate_global.cc: Require
......
...@@ -22,44 +22,50 @@ ...@@ -22,44 +22,50 @@
include $(top_srcdir)/fragment.am include $(top_srcdir)/fragment.am
# Documentation Overview
#
# There are two main source materials for libstdc++ documentation.
# The first is the doxygen markup in libstdc++ sources. And the second
# is the docbook markup in doc/xml/. A third and more obscure option
# deals with charting performance tests.
# Default, points to current best sub-rule that is the best conversion.
# MAN
doc-man: doc-man-doxygen
# PDF
doc-pdf: doc-pdf-dblatex-docbook
# HTML
doc-html: doc-html-docbook
# Doxygen configuration # Doxygen configuration
# Assumes doxygen, graphviz (with dot) installed # Assumes doxygen, graphviz (with dot) installed
doc_doxygen_script=${top_srcdir}/scripts/run_doxygen doxygen_script=${top_srcdir}/scripts/run_doxygen
doxygen_outdir = ${glibcxx_builddir}/doc/doxygen
doc-html-doxygen: doc-html-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES) --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
doc-man-doxygen: doc-man-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES) --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
doc-xml-doxygen: doc-xml-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO) --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml doc-xml-single-doxygen:
doc-xml-doxygen-single: doc-xml-doxygen
@echo "Generating doxygen xml single file..." @echo "Generating doxygen xml single file..."
$(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml; $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \
${doxygen_outdir}/xml/spine.xml > ${doxygen_outdir}/xml/all.xml;
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
doc_performance_script=${top_srcdir}/scripts/make_graphs.py
doc-html-performance:
-@(chmod + ${doc_performance_script}; \
${doc_performance_script} ${top_srcdir} \
${glibcxx_builddir}/testsuite \
${top_srcdir}/testsuite/data/make_graph_htmls.xml \
${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
# Docbook configuration. # Docbook configuration.
...@@ -68,6 +74,7 @@ doc-html-performance: ...@@ -68,6 +74,7 @@ doc-html-performance:
# docbook-style-xsl # docbook-style-xsl
# emacs-nxml-mode # emacs-nxml-mode
# xmlto passivetex # xmlto passivetex
docbook_outdir = ${glibcxx_builddir}/doc/docbook
xml_srcdir = ${glibcxx_srcdir}/doc/xml xml_srcdir = ${glibcxx_srcdir}/doc/xml
xml_sources = \ xml_sources = \
${xml_srcdir}/spine.xml \ ${xml_srcdir}/spine.xml \
...@@ -112,6 +119,7 @@ xml_sources = \ ...@@ -112,6 +119,7 @@ xml_sources = \
${xml_srcdir}/manual/support.xml \ ${xml_srcdir}/manual/support.xml \
${xml_srcdir}/manual/test.xml \ ${xml_srcdir}/manual/test.xml \
${xml_srcdir}/manual/using.xml \ ${xml_srcdir}/manual/using.xml \
${xml_srcdir}/manual/using_exceptions.xml \
${xml_srcdir}/manual/utilities.xml \ ${xml_srcdir}/manual/utilities.xml \
${xml_srcdir}/manual/appendix_free.xml \ ${xml_srcdir}/manual/appendix_free.xml \
${xml_srcdir}/manual/appendix_contributing.xml \ ${xml_srcdir}/manual/appendix_contributing.xml \
...@@ -137,17 +145,17 @@ XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl ...@@ -137,17 +145,17 @@ XSL_HTML_STYLE = $(XSL_STYLE_DIR)/xhtml/chunk.xsl
#XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl #XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/onechunk.xsl
XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl XSL_HTML_SINGLE_STYLE = $(XSL_STYLE_DIR)/xhtml/docbook.xsl
${glibcxx_builddir}/doc/html: ${docbook_outdir}/html:
mkdir ${glibcxx_builddir}/doc/html mkdir -p ${docbook_outdir}/html
${glibcxx_builddir}/doc/pdf: ${docbook_outdir}/pdf:
mkdir ${glibcxx_builddir}/doc/pdf mkdir -p ${docbook_outdir}/pdf
${glibcxx_builddir}/doc/fo: ${docbook_outdir}/fo:
mkdir ${glibcxx_builddir}/doc/fo mkdir -p ${docbook_outdir}/fo
${glibcxx_builddir}/doc/xml: ${docbook_outdir}/xml:
mkdir ${glibcxx_builddir}/doc/xml mkdir -p ${docbook_outdir}/xml
# Validate existing XML structure. # Validate existing XML structure.
XMLLINT = xmllint XMLLINT = xmllint
...@@ -156,57 +164,53 @@ XMLLINT = xmllint ...@@ -156,57 +164,53 @@ XMLLINT = xmllint
LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout LINT_FLAGS = --postvalid --debug --xinclude --noent --noblanks --nonet --noout
VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd VALID_FLAGS = --dtdvalid http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS) XMLLINT_FLAGS = $(LINT_FLAGS) $(VALID_FLAGS)
doc-xml-validate: $(xml_sources) doc-xml-validate-docbook: $(xml_sources)
@echo "Generating XML validation log..." @echo "Generating XML validation log..."
$(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml doc-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
@echo "Generating XML single..." @echo "Generating XML single..."
$(XMLLINT) --xinclude --noent --noblanks \ $(XMLLINT) --xinclude --noent --noblanks \
-o ${glibcxx_builddir}/doc/xml/spine-single.xml \ -o ${docbook_outdir}/xml/spine-single.xml \
${top_srcdir}/doc/xml/spine.xml ${top_srcdir}/doc/xml/spine.xml
# HTML, index plus chapters # HTML, index plus chapters
doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html doc-html-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html files..." @echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
# HTML, all one page # HTML, all one page
doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html doc-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html single file..." @echo "Generating html single file..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
# FO # FO
doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo doc-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
@echo "Generating FO files..." @echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
# PDF
# Points to current best xml to PDF generation process.
doc-pdf: doc-pdf-dblatex
# PDF 1 # PDF 1
# fop # fop
FOP = fop FOP = fop
FOP_FLAGS = -d -r FOP_FLAGS = -d -r
doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-fop-xml-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf
@echo "Generating pdf fop files from xml..." @echo "Generating pdf fop files from xml..."
$(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \ $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
-xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf -xsl $(XSL_FO_STYLE) -pdf ${docbook_outdir}/pdf/spine.pdf
doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo doc-pdf-fop-fo-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
@echo "Generating pdf fop files from fo..." @echo "Generating pdf fop files from fo..."
$(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \ $(FOP) $(FOP_FLAGS) -fo ${docbook_outdir}/fo/spine.fo \
-pdf ${glibcxx_builddir}/doc/pdf/spine.pdf -pdf ${docbook_outdir}/pdf/spine.pdf
# PDF 2 # PDF 2
# xmlto # xmlto
XML2PDF = xmlto XML2PDF = xmlto
XML2PDF_FLAGS = -v pdf --skip-validation -o pdf XML2PDF_FLAGS = -v pdf --skip-validation -o pdf
doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-xmlto-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf xmlto files..." @echo "Generating pdf xmlto files..."
$(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
...@@ -214,26 +218,37 @@ doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf ...@@ -214,26 +218,37 @@ doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf
# xmlroff # xmlroff
XMLROFF = xmlroff XMLROFF = xmlroff
XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue XMLROFF_FLAGS = --format=pdf --backend=cairo --warn=1 --debug=1 --continue
doc-pdf-xmlroff: $(xml_sources) doc-fo doc-pdf-xmlroff-docbook: $(xml_sources) doc-fo
@echo "Generating pdf xmlroff files..." @echo "Generating pdf xmlroff files..."
$(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo $(XMLROFF) $(XMLROFF_FLAGS) ${docbook_outdir}/fo/spine.fo
# PDF 4 # PDF 4
# prince # prince
PRINCE = prince PRINCE = prince
PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-prince-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf prince files..." @echo "Generating pdf prince files..."
$(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/xml/spine.xml
# PDF 5 # PDF 5
# dblatex # dblatex
DBLATEX_FLAGS = --dump --verbose --pdf -o pdf/manual.pdf DBLATEX_FLAGS = --dump --verbose --pdf -o ${docbook_outdir}/pdf/manual.pdf
doc-pdf-dblatex: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-dblatex-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf dblatex files..." @echo "Generating pdf dblatex files..."
dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
doc_performance_script=${top_srcdir}/scripts/make_graphs.py
doc-html-performance:
-@(chmod + ${doc_performance_script}; \
${doc_performance_script} ${top_srcdir} \
${glibcxx_builddir}/testsuite \
${top_srcdir}/testsuite/data/make_graph_htmls.xml \
${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
.PHONY: doc-doxygen-html doc-doxygen-man doc-performance .PHONY: doc-doxygen-html doc-doxygen-man doc-performance
# By adding these files here, automake will remove them for 'make clean' # By adding these files here, automake will remove them for 'make clean'
...@@ -241,4 +256,4 @@ CLEANFILES = *.log ...@@ -241,4 +256,4 @@ CLEANFILES = *.log
# To remove directories. # To remove directories.
clean-local: clean-local:
rm -rf man html pdf fo doxygen xml rm -rf man html pdf fo xml doxygen docbook
...@@ -265,13 +265,8 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ...@@ -265,13 +265,8 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
# Doxygen configuration # Doxygen configuration
# Assumes doxygen, graphviz (with dot) installed # Assumes doxygen, graphviz (with dot) installed
doc_doxygen_script = ${top_srcdir}/scripts/run_doxygen doxygen_script = ${top_srcdir}/scripts/run_doxygen
doxygen_xmldir = ${glibcxx_builddir}/doc/doxygen/xml doxygen_outdir = ${glibcxx_builddir}/doc/doxygen
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
# Docbook configuration. # Docbook configuration.
# Assumes # Assumes
...@@ -279,6 +274,7 @@ doc_performance_script = ${top_srcdir}/scripts/make_graphs.py ...@@ -279,6 +274,7 @@ doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
# docbook-style-xsl # docbook-style-xsl
# emacs-nxml-mode # emacs-nxml-mode
# xmlto passivetex # xmlto passivetex
docbook_outdir = ${glibcxx_builddir}/doc/docbook
xml_srcdir = ${glibcxx_srcdir}/doc/xml xml_srcdir = ${glibcxx_srcdir}/doc/xml
xml_sources = \ xml_sources = \
${xml_srcdir}/spine.xml \ ${xml_srcdir}/spine.xml \
...@@ -323,6 +319,7 @@ xml_sources = \ ...@@ -323,6 +319,7 @@ xml_sources = \
${xml_srcdir}/manual/support.xml \ ${xml_srcdir}/manual/support.xml \
${xml_srcdir}/manual/test.xml \ ${xml_srcdir}/manual/test.xml \
${xml_srcdir}/manual/using.xml \ ${xml_srcdir}/manual/using.xml \
${xml_srcdir}/manual/using_exceptions.xml \
${xml_srcdir}/manual/utilities.xml \ ${xml_srcdir}/manual/utilities.xml \
${xml_srcdir}/manual/appendix_free.xml \ ${xml_srcdir}/manual/appendix_free.xml \
${xml_srcdir}/manual/appendix_contributing.xml \ ${xml_srcdir}/manual/appendix_contributing.xml \
...@@ -377,7 +374,12 @@ PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf ...@@ -377,7 +374,12 @@ PRINCE_FLAGS = --log prince.log -o pdf/spine.pdf
# PDF 5 # PDF 5
# dblatex # dblatex
DBLATEX_FLAGS = --dump --verbose --pdf -o pdf/manual.pdf DBLATEX_FLAGS = --dump --verbose --pdf -o ${docbook_outdir}/pdf/manual.pdf
# Performance doc and graph configuration.
# Assumes pychart, beautiful soup installed.
# Generates the plots and graphs for performance testing.
doc_performance_script = ${top_srcdir}/scripts/make_graphs.py
# By adding these files here, automake will remove them for 'make clean' # By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.log CLEANFILES = *.log
...@@ -567,102 +569,117 @@ uninstall-am: ...@@ -567,102 +569,117 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall uninstall-am
# Documentation Overview
#
# There are two main source materials for libstdc++ documentation.
# The first is the doxygen markup in libstdc++ sources. And the second
# is the docbook markup in doc/xml/. A third and more obscure option
# deals with charting performance tests.
# Default, points to current best sub-rule that is the best conversion.
# MAN
doc-man: doc-man-doxygen
# PDF
doc-pdf: doc-pdf-dblatex-docbook
# HTML
doc-html: doc-html-docbook
doc-html-doxygen: doc-html-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES) --host_alias=${host_alias} --mode=html $${srcdir} $${builddir} YES)
doc-man-doxygen: doc-man-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES) --host_alias=${host_alias} --mode=man $${srcdir} $${builddir} YES)
doc-xml-doxygen: doc-xml-doxygen:
-(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
builddir=`cd ..; ${PWD_COMMAND}`; \ builddir=`cd ..; ${PWD_COMMAND}`; \
${SHELL} ${doc_doxygen_script} \ ${SHELL} ${doxygen_script} \
--host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO) --host_alias=${host_alias} --mode=xml $${srcdir} $${builddir} NO)
doc-xml-doxygen-single: doc-xml-doxygen
doc-xml-single-doxygen:
@echo "Generating doxygen xml single file..." @echo "Generating doxygen xml single file..."
$(XSLTPROC) ${doxygen_xmldir}/combine.xslt ${doxygen_xmldir}/spine.xml > ${doxygen_xmldir}/all.xml; $(XSLTPROC) ${doxygen_outdir}/xml/combine.xslt \
doc-html-performance: ${doxygen_outdir}/xml/spine.xml > ${doxygen_outdir}/xml/all.xml;
-@(chmod + ${doc_performance_script}; \
${doc_performance_script} ${top_srcdir} \
${glibcxx_builddir}/testsuite \
${top_srcdir}/testsuite/data/make_graph_htmls.xml \
${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
${glibcxx_builddir}/doc/html: ${docbook_outdir}/html:
mkdir ${glibcxx_builddir}/doc/html mkdir -p ${docbook_outdir}/html
${glibcxx_builddir}/doc/pdf: ${docbook_outdir}/pdf:
mkdir ${glibcxx_builddir}/doc/pdf mkdir -p ${docbook_outdir}/pdf
${glibcxx_builddir}/doc/fo: ${docbook_outdir}/fo:
mkdir ${glibcxx_builddir}/doc/fo mkdir -p ${docbook_outdir}/fo
${glibcxx_builddir}/doc/xml: ${docbook_outdir}/xml:
mkdir ${glibcxx_builddir}/doc/xml mkdir -p ${docbook_outdir}/xml
doc-xml-validate: $(xml_sources) doc-xml-validate-docbook: $(xml_sources)
@echo "Generating XML validation log..." @echo "Generating XML validation log..."
$(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(XMLLINT) $(XMLLINT_FLAGS) ${top_srcdir}/doc/xml/spine.xml
doc-xml-single: $(xml_sources) ${glibcxx_builddir}/doc/xml doc-xml-single-docbook: $(xml_sources) ${docbook_outdir}/xml
@echo "Generating XML single..." @echo "Generating XML single..."
$(XMLLINT) --xinclude --noent --noblanks \ $(XMLLINT) --xinclude --noent --noblanks \
-o ${glibcxx_builddir}/doc/xml/spine-single.xml \ -o ${docbook_outdir}/xml/spine-single.xml \
${top_srcdir}/doc/xml/spine.xml ${top_srcdir}/doc/xml/spine.xml
# HTML, index plus chapters # HTML, index plus chapters
doc-html: $(xml_sources) ${glibcxx_builddir}/doc/html doc-html-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html files..." @echo "Generating html files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_HTML_STYLE) ${top_srcdir}/doc/xml/spine.xml
# HTML, all one page # HTML, all one page
doc-html-single: $(xml_sources) ${glibcxx_builddir}/doc/html doc-html-single-docbook: $(xml_sources) ${docbook_outdir}/html
@echo "Generating html single file..." @echo "Generating html single file..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/html/ \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/html/ \
$(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_HTML_SINGLE_STYLE) ${top_srcdir}/doc/xml/spine.xml
# FO # FO
doc-fo: $(xml_sources) ${glibcxx_builddir}/doc/fo doc-fo-docbook: $(xml_sources) ${docbook_outdir}/fo
@echo "Generating FO files..." @echo "Generating FO files..."
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ${glibcxx_builddir}/doc/fo/spine.fo \ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ${docbook_outdir}/fo/spine.fo \
$(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml $(XSL_FO_STYLE) ${top_srcdir}/doc/xml/spine.xml
doc-pdf-fop-xml-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf
# PDF
# Points to current best xml to PDF generation process.
doc-pdf: doc-pdf-dblatex
doc-pdf-fop-xml: $(xml_sources) ${glibcxx_builddir}/doc/pdf
@echo "Generating pdf fop files from xml..." @echo "Generating pdf fop files from xml..."
$(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \ $(FOP) $(FOP_FLAGS) -xml ${top_srcdir}/doc/xml/spine.xml \
-xsl $(XSL_FO_STYLE) -pdf ${glibcxx_builddir}/doc/pdf/spine.pdf -xsl $(XSL_FO_STYLE) -pdf ${docbook_outdir}/pdf/spine.pdf
doc-pdf-fop-fo: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo doc-pdf-fop-fo-docbook: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-fo
@echo "Generating pdf fop files from fo..." @echo "Generating pdf fop files from fo..."
$(FOP) $(FOP_FLAGS) -fo ${glibcxx_builddir}/doc/fo/spine.fo \ $(FOP) $(FOP_FLAGS) -fo ${docbook_outdir}/fo/spine.fo \
-pdf ${glibcxx_builddir}/doc/pdf/spine.pdf -pdf ${docbook_outdir}/pdf/spine.pdf
doc-pdf-xmlto: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-xmlto-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf xmlto files..." @echo "Generating pdf xmlto files..."
$(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(XML2PDF) $(XML2PDF_FLAGS) ${top_srcdir}/doc/xml/spine.xml
doc-pdf-xmlroff: $(xml_sources) doc-fo doc-pdf-xmlroff-docbook: $(xml_sources) doc-fo
@echo "Generating pdf xmlroff files..." @echo "Generating pdf xmlroff files..."
$(XMLROFF) $(XMLROFF_FLAGS) ${glibcxx_builddir}/doc/fo/spine.fo $(XMLROFF) $(XMLROFF_FLAGS) ${docbook_outdir}/fo/spine.fo
doc-pdf-prince: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-prince-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf prince files..." @echo "Generating pdf prince files..."
$(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/doc/xml/spine.xml $(PRINCE) $(PRINCE_FLAGS) ${top_srcdir}/xml/spine.xml
doc-pdf-dblatex: $(xml_sources) ${glibcxx_builddir}/doc/pdf doc-pdf-dblatex-docbook: $(xml_sources) ${docbook_outdir}/pdf
@echo "Generating pdf dblatex files..." @echo "Generating pdf dblatex files..."
dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml dblatex $(DBLATEX_FLAGS) ${top_srcdir}/doc/xml/spine.xml
doc-html-performance:
-@(chmod + ${doc_performance_script}; \
${doc_performance_script} ${top_srcdir} \
${glibcxx_builddir}/testsuite \
${top_srcdir}/testsuite/data/make_graph_htmls.xml \
${top_srcdir}/testsuite/data/make_graph_test_infos.xml local g++)
.PHONY: doc-doxygen-html doc-doxygen-man doc-performance .PHONY: doc-doxygen-html doc-doxygen-man doc-performance
# To remove directories. # To remove directories.
clean-local: clean-local:
rm -rf man html pdf fo doxygen xml rm -rf man html pdf fo xml doxygen docbook
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
......
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
<para> <para>
If the only functions from <filename>libstdc++.a</filename> If the only functions from <filename>libstdc++.a</filename>
which you need are language support functions (those listed in which you need are language support functions (those listed in
<link linkend="manual.support">clause 18</link> of the <link linkend="std.support">clause 18</link> of the
standard, e.g., <function>new</function> and standard, e.g., <function>new</function> and
<function>delete</function>), then try linking against <function>delete</function>), then try linking against
<filename>libsupc++.a</filename>, which is a subset of <filename>libsupc++.a</filename>, which is a subset of
...@@ -896,7 +896,7 @@ ...@@ -896,7 +896,7 @@
<para> <para>
More information, including how to optionally enable/disable the More information, including how to optionally enable/disable the
checks, is available checks, is available
<link linkend="manual.diagnostics.concept_checking">here</link>. <link linkend="std.diagnostics.concept_checking">here</link>.
</para> </para>
</answer> </answer>
</qandaentry> </qandaentry>
...@@ -962,7 +962,7 @@ ...@@ -962,7 +962,7 @@
<answer id="a-list_size_on"> <answer id="a-list_size_on">
<para> <para>
See See
the <link linkend="manual.containers">Containers</link> the <link linkend="std.containers">Containers</link>
chapter. chapter.
</para> </para>
</answer> </answer>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.algorithms" xreflabel="Algorithms"> <chapter id="std.algorithms" xreflabel="Algorithms">
<?dbhtml filename="algorithms.html"?> <?dbhtml filename="algorithms.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -18,71 +18,69 @@ ...@@ -18,71 +18,69 @@
algorithm algorithm
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Algorithms Algorithms
<indexterm><primary>Algorithms</primary></indexterm> <indexterm><primary>Algorithms</primary></indexterm>
</title> </title>
<preface>
<title></title>
<para> <para>
The neatest accomplishment of the algorithms chapter is that all the The neatest accomplishment of the algorithms sect1 is that all the
work is done via iterators, not containers directly. This means two work is done via iterators, not containers directly. This means two
important things: important things:
</para> </para>
<orderedlist> <orderedlist>
<listitem> <listitem>
<para> <para>
Anything that behaves like an iterator can be used in one of Anything that behaves like an iterator can be used in one of
these algorithms. Raw pointers make great candidates, thus these algorithms. Raw pointers make great candidates, thus
built-in arrays are fine containers, as well as your own iterators. built-in arrays are fine containers, as well as your own
</para> iterators.
</listitem> </para>
<listitem> </listitem>
<para> <listitem>
The algorithms do not (and cannot) affect the container as a <para>
whole; only the things between the two iterator endpoints. If The algorithms do not (and cannot) affect the container as a
you pass a range of iterators only enclosing the middle third of whole; only the things between the two iterator endpoints. If
a container, then anything outside that range is inviolate. you pass a range of iterators only enclosing the middle third of
</para> a container, then anything outside that range is inviolate.
</listitem> </para>
</orderedlist> </listitem>
<para> </orderedlist>
Even strings can be fed through the algorithms here, although the <para>
string class has specialized versions of many of these functions Even strings can be fed through the algorithms here, although the
(for example, <code>string::find()</code>). Most of the examples string class has specialized versions of many of these functions
on this page will use simple arrays of integers as a playground (for example, <code>string::find()</code>). Most of the examples
for algorithms, just to keep things simple. The use of on this page will use simple arrays of integers as a playground
<emphasis>N</emphasis> as a size in the examples is to keep for algorithms, just to keep things simple. The use of
things easy to read but probably won't be valid code. You can <emphasis>N</emphasis> as a size in the examples is to keep things
use wrappers such as those described in the <link easy to read but probably won't be valid code. You can use wrappers
linkend="manual.containers">containers chapter</link> to such as those described in
keep real code readable. the <link linkend="std.containers">containers sect1</link> to keep
</para> real code readable.
<para> </para>
The single thing that trips people up the most is the definition <para>
of <emphasis>range</emphasis> used with iterators; the famous The single thing that trips people up the most is the definition
&quot;past-the-end&quot; rule that everybody loves to hate. The of <emphasis>range</emphasis> used with iterators; the famous
<link linkend="manual.iterators">iterators &quot;past-the-end&quot; rule that everybody loves to hate. The
chapter</link> of this document has a complete explanation of <link linkend="std.iterators">iterators sect1</link> of this
this simple rule that seems to cause so much confusion. Once you document has a complete explanation of this simple rule that seems
get <emphasis>range</emphasis> into your head (it's not that to cause so much confusion. Once you
hard, honest!), then the algorithms are a cakewalk. get <emphasis>range</emphasis> into your head (it's not that hard,
</para> honest!), then the algorithms are a cakewalk.
</preface> </para>
<!-- Chapter 01 : Non Modifying --> <!-- Sect1 01 : Non Modifying -->
<!-- Chapter 02 : Mutating --> <!-- Sect1 02 : Mutating -->
<chapter id="manual.algorithms.mutating" xreflabel="Mutating"> <sect1 id="std.algorithms.mutating" xreflabel="Mutating">
<title>Mutating</title> <title>Mutating</title>
<sect1 id="algorithms.mutating.swap" xreflabel="swap"> <sect2 id="algorithms.mutating.swap" xreflabel="swap">
<title><function>swap</function></title> <title><function>swap</function></title>
<sect2 id="algorithms.swap.specializations" xreflabel="Specializations"> <sect3 id="algorithms.swap.specializations" xreflabel="Specializations">
<title>Specializations</title> <title>Specializations</title>
<para>If you call <code> std::swap(x,y); </code> where x and y are standard <para>If you call <code> std::swap(x,y); </code> where x and y are standard
...@@ -98,10 +96,10 @@ ...@@ -98,10 +96,10 @@
internal pointers to storage need to be exchanged. internal pointers to storage need to be exchanged.
</para> </para>
</sect2> </sect3>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 03 : Sorting --> <!-- Sect1 03 : Sorting -->
</part> </chapter>
<sect1 id="manual.util.memory.allocator" xreflabel="Allocator"> <section id="std.util.memory.allocator" xreflabel="Allocator">
<?dbhtml filename="allocator.html"?> <?dbhtml filename="allocator.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
allocator allocator
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>Allocators</title> <title>Allocators</title>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
management classes. management classes.
</para> </para>
<sect2 id="allocator.req"> <section id="allocator.req">
<title>Requirements</title> <title>Requirements</title>
<para> <para>
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
<constant>[20.4 Memory]</constant>. <constant>[20.4 Memory]</constant>.
</para> </para>
</sect2> </section>
<sect2 id="allocator.design_issues"> <section id="allocator.design_issues">
<title>Design Issues</title> <title>Design Issues</title>
<para> <para>
...@@ -136,12 +136,12 @@ ...@@ -136,12 +136,12 @@
<function>abi::__cxa_atexit</function> is not recommended. <function>abi::__cxa_atexit</function> is not recommended.
</para> </para>
</sect2> </section>
<sect2 id="allocator.impl"> <section id="allocator.impl">
<title>Implementation</title> <title>Implementation</title>
<sect3> <section>
<title>Interface Design</title> <title>Interface Design</title>
<para> <para>
...@@ -163,9 +163,9 @@ ...@@ -163,9 +163,9 @@
may not be user-configurable. may not be user-configurable.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Selecting Default Allocation Policy</title> <title>Selecting Default Allocation Policy</title>
<para> <para>
...@@ -229,9 +229,9 @@ ...@@ -229,9 +229,9 @@
<classname>__gnu_cxx::new_allocator</classname>. <classname>__gnu_cxx::new_allocator</classname>.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Disabling Memory Caching</title> <title>Disabling Memory Caching</title>
<para> <para>
...@@ -281,11 +281,11 @@ ...@@ -281,11 +281,11 @@
cached allocations...). cached allocations...).
</para> </para>
</sect3> </section>
</sect2> </section>
<sect2 id="allocator.using"> <section id="allocator.using">
<title>Using a Specific Allocator</title> <title>Using a Specific Allocator</title>
<para> <para>
...@@ -303,9 +303,9 @@ ...@@ -303,9 +303,9 @@
<programlisting> <programlisting>
std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque; std::deque &lt;int, __gnu_cxx::debug_allocator&lt;std::allocator&lt;int&gt; &gt; &gt; debug_deque;
</programlisting> </programlisting>
</sect2> </section>
<sect2 id="allocator.custom"> <section id="allocator.custom">
<title>Custom Allocators</title> <title>Custom Allocators</title>
<para> <para>
...@@ -321,9 +321,9 @@ ...@@ -321,9 +321,9 @@
<classname>new_allocator</classname>. <classname>new_allocator</classname>.
</para> </para>
</sect2> </section>
<sect2 id="allocator.ext"> <section id="allocator.ext">
<title>Extension Allocators</title> <title>Extension Allocators</title>
<para> <para>
...@@ -489,7 +489,7 @@ ...@@ -489,7 +489,7 @@
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
</sect2> </section>
<bibliography id="allocator.biblio"> <bibliography id="allocator.biblio">
...@@ -615,4 +615,4 @@ ...@@ -615,4 +615,4 @@
</biblioentry> </biblioentry>
</bibliography> </bibliography>
</sect1> </section>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<appendix id="appendix.contrib" xreflabel="Contributing"> <appendix id="appendix.contrib" xreflabel="Contributing">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</indexterm> </indexterm>
</title> </title>
<para> <para>
The GNU C++ Library follows an open development model. Active The GNU C++ Library follows an open development model. Active
contributors are assigned maintainer-ship responsibility, and given contributors are assigned maintainer-ship responsibility, and given
write access to the source repository. First time contributors write access to the source repository. First time contributors
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
Get and read the relevant sections of the C++ language Get and read the relevant sections of the C++ language
specification. Copies of the full ISO 14882 standard are specification. Copies of the full ISO 14882 standard are
available on line via the ISO mirror site for committee available on line via the ISO mirror site for committee
...@@ -50,14 +50,14 @@ ...@@ -50,14 +50,14 @@
the standard from their respective national standards the standard from their respective national standards
organization. In the USA, this national standards organization. In the USA, this national standards
organization is ANSI and their web-site is right organization is ANSI and their web-site is right
<ulink url="http://www.ansi.org">here.</ulink> <ulink url="http://www.ansi.org">here.</ulink>
(And if you've already registered with them, clicking this link will take you to directly to the place where you can (And if you've already registered with them, clicking this link will take you to directly to the place where you can
<ulink url="http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC+14882:2003">buy the standard on-line.)</ulink> <ulink url="http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC+14882:2003">buy the standard on-line.)</ulink>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The library working group bugs, and known defects, can The library working group bugs, and known defects, can
be obtained here: be obtained here:
<ulink url="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21 </ulink> <ulink url="http://www.open-std.org/jtc1/sc22/wg21/">http://www.open-std.org/jtc1/sc22/wg21 </ulink>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The newsgroup dedicated to standardization issues is The newsgroup dedicated to standardization issues is
comp.std.c++: this FAQ for this group is quite useful and comp.std.c++: this FAQ for this group is quite useful and
can be can be
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Peruse Peruse
the <ulink url="http://www.gnu.org/prep/standards">GNU the <ulink url="http://www.gnu.org/prep/standards">GNU
Coding Standards</ulink>, and chuckle when you hit the part Coding Standards</ulink>, and chuckle when you hit the part
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Be familiar with the extensions that preceded these Be familiar with the extensions that preceded these
general GNU rules. These style issues for libstdc++ can be general GNU rules. These style issues for libstdc++ can be
found <link linkend="contrib.coding_style">here</link>. found <link linkend="contrib.coding_style">here</link>.
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
And last but certainly not least, read the And last but certainly not least, read the
library-specific information library-specific information
found <link linkend="appendix.porting"> here</link>. found <link linkend="appendix.porting"> here</link>.
...@@ -107,10 +107,10 @@ ...@@ -107,10 +107,10 @@
Small changes can be accepted without a copyright assignment form on Small changes can be accepted without a copyright assignment form on
file. New code and additions to the library need completed copyright file. New code and additions to the library need completed copyright
assignment form on file at the FSF. Note: your employer may be required assignment form on file at the FSF. Note: your employer may be required
to fill out appropriate disclaimer forms as well. to fill out appropriate disclaimer forms as well.
</para> </para>
<para> <para>
Historically, the libstdc++ assignment form added the following Historically, the libstdc++ assignment form added the following
question: question:
</para> </para>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</para> </para>
<para> <para>
For more information about getting a copyright assignment, please see For more information about getting a copyright assignment, please see
<ulink url="http://www.gnu.org/prep/maintain/html_node/Legal-Matters.html">Legal <ulink url="http://www.gnu.org/prep/maintain/html_node/Legal-Matters.html">Legal
Matters</ulink>. Matters</ulink>.
</para> </para>
...@@ -162,34 +162,34 @@ ...@@ -162,34 +162,34 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para> <para>
A description of the bug and how your patch fixes this A description of the bug and how your patch fixes this
bug. For new features a description of the feature and your bug. For new features a description of the feature and your
implementation. implementation.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
A ChangeLog entry as plain text; see the various A ChangeLog entry as plain text; see the various
ChangeLog files for format and content. If you are ChangeLog files for format and content. If you are
using emacs as your editor, simply position the insertion using emacs as your editor, simply position the insertion
point at the beginning of your change and hit CX-4a to bring point at the beginning of your change and hit CX-4a to bring
up the appropriate ChangeLog entry. See--magic! Similar up the appropriate ChangeLog entry. See--magic! Similar
functionality also exists for vi. functionality also exists for vi.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
A testsuite submission or sample program that will A testsuite submission or sample program that will
easily and simply show the existing error or test new easily and simply show the existing error or test new
functionality. functionality.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The patch itself. If you are accessing the SVN The patch itself. If you are accessing the SVN
repository use <command>svn update; svn diff NEW</command>; repository use <command>svn update; svn diff NEW</command>;
else, use <command>diff -cp OLD NEW</command> ... If your else, use <command>diff -cp OLD NEW</command> ... If your
...@@ -202,13 +202,13 @@ ...@@ -202,13 +202,13 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
When you have all these pieces, bundle them up in a When you have all these pieces, bundle them up in a
mail message and send it to libstdc++@gcc.gnu.org. All mail message and send it to libstdc++@gcc.gnu.org. All
patches and related discussion should be sent to the patches and related discussion should be sent to the
libstdc++ mailing list. libstdc++ mailing list.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect2> </sect2>
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
<sect1 id="contrib.organization" xreflabel="Source Organization"> <sect1 id="contrib.organization" xreflabel="Source Organization">
<?dbhtml filename="source_organization.html"?> <?dbhtml filename="source_organization.html"?>
<title>Directory Layout and Source Conventions</title> <title>Directory Layout and Source Conventions</title>
<para> <para>
The unpacked source directory of libstdc++ contains the files The unpacked source directory of libstdc++ contains the files
needed to create the GNU C++ Library. needed to create the GNU C++ Library.
...@@ -238,26 +238,26 @@ It has subdirectories: ...@@ -238,26 +238,26 @@ It has subdirectories:
include/std include/std
Files meant to be found by #include &lt;name&gt; directives in Files meant to be found by #include &lt;name&gt; directives in
standard-conforming user programs. standard-conforming user programs.
include/c include/c
Headers intended to directly include standard C headers. Headers intended to directly include standard C headers.
[NB: this can be enabled via --enable-cheaders=c] [NB: this can be enabled via --enable-cheaders=c]
include/c_global include/c_global
Headers intended to include standard C headers in Headers intended to include standard C headers in
the global namespace, and put select names into the std:: the global namespace, and put select names into the std::
namespace. [NB: this is the default, and is the same as namespace. [NB: this is the default, and is the same as
--enable-cheaders=c_global] --enable-cheaders=c_global]
include/c_std include/c_std
Headers intended to include standard C headers Headers intended to include standard C headers
already in namespace std, and put select names into the std:: already in namespace std, and put select names into the std::
namespace. [NB: this is the same as --enable-cheaders=c_std] namespace. [NB: this is the same as --enable-cheaders=c_std]
include/bits include/bits
Files included by standard headers and by other files in Files included by standard headers and by other files in
the bits directory. the bits directory.
include/backward include/backward
Headers provided for backward compatibility, such as &lt;iostream.h&gt;. Headers provided for backward compatibility, such as &lt;iostream.h&gt;.
...@@ -276,7 +276,7 @@ It has subdirectories: ...@@ -276,7 +276,7 @@ It has subdirectories:
installed. installed.
testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*] testsuites/[backward, demangle, ext, performance, thread, 17_* to 27_*]
Test programs are here, and may be used to begin to exercise the Test programs are here, and may be used to begin to exercise the
library. Support for "make check" and "make check-install" is library. Support for "make check" and "make check-install" is
complete, and runs through all the subdirectories here when this complete, and runs through all the subdirectories here when this
command is issued from the build directory. Please note that command is issued from the build directory. Please note that
...@@ -378,7 +378,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -378,7 +378,7 @@ indicate a place that may require attention for multi-thread safety.
these names as operators have been fixed.] these names as operators have been fixed.]
The full set of __* identifiers (combined from gcc/cp/lex.c and The full set of __* identifiers (combined from gcc/cp/lex.c and
gcc/cplus-dem.c) that are either old or new, but are definitely gcc/cplus-dem.c) that are either old or new, but are definitely
recognized by the demangler, is: recognized by the demangler, is:
__aa __aa
...@@ -548,8 +548,8 @@ indicate a place that may require attention for multi-thread safety. ...@@ -548,8 +548,8 @@ indicate a place that may require attention for multi-thread safety.
-NOT- -NOT-
char *p = "flop"; // wrong char *p = "flop"; // wrong
char &amp;c = *p; // wrong char &amp;c = *p; // wrong
Reason: In C++, definitions are mixed with executable code. Here, Reason: In C++, definitions are mixed with executable code. Here,
p is being initialized, not *p. This is near-universal p is being initialized, not *p. This is near-universal
practice among C++ programmers; it is normal for C hackers practice among C++ programmers; it is normal for C hackers
to switch spontaneously as they gain experience. to switch spontaneously as they gain experience.
...@@ -558,9 +558,9 @@ indicate a place that may require attention for multi-thread safety. ...@@ -558,9 +558,9 @@ indicate a place that may require attention for multi-thread safety.
operator==(type) operator==(type)
-NOT- -NOT-
operator == (type) // wrong operator == (type) // wrong
Reason: The == is part of the function name. Separating Reason: The == is part of the function name. Separating
it makes the declaration look like an expression. it makes the declaration look like an expression.
03. Function names and parentheses 03. Function names and parentheses
void mangle() void mangle()
...@@ -569,22 +569,22 @@ indicate a place that may require attention for multi-thread safety. ...@@ -569,22 +569,22 @@ indicate a place that may require attention for multi-thread safety.
Reason: no space before parentheses (except after a control-flow Reason: no space before parentheses (except after a control-flow
keyword) is near-universal practice for C++. It identifies the keyword) is near-universal practice for C++. It identifies the
parentheses as the function-call operator or declarator, as parentheses as the function-call operator or declarator, as
opposed to an expression or other overloaded use of parentheses. opposed to an expression or other overloaded use of parentheses.
04. Template function indentation 04. Template function indentation
template&lt;typename T&gt; template&lt;typename T&gt;
void void
template_function(args) template_function(args)
{ } { }
-NOT- -NOT-
template&lt;class T&gt; template&lt;class T&gt;
void template_function(args) {}; void template_function(args) {};
Reason: In class definitions, without indentation whitespace is Reason: In class definitions, without indentation whitespace is
needed both above and below the declaration to distinguish needed both above and below the declaration to distinguish
it visually from other members. (Also, re: "typename" it visually from other members. (Also, re: "typename"
rather than "class".) T often could be int, which is rather than "class".) T often could be int, which is
not a class. ("class", here, is an anachronism.) not a class. ("class", here, is an anachronism.)
05. Template class indentation 05. Template class indentation
...@@ -622,7 +622,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -622,7 +622,7 @@ indicate a place that may require attention for multi-thread safety.
07. Member initialization lists 07. Member initialization lists
All one line, separate from class name. All one line, separate from class name.
gribble::gribble() gribble::gribble()
: _M_private_data(0), _M_more_stuff(0), _M_helper(0); : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
{ } { }
-NOT- -NOT-
...@@ -630,18 +630,18 @@ indicate a place that may require attention for multi-thread safety. ...@@ -630,18 +630,18 @@ indicate a place that may require attention for multi-thread safety.
{ } { }
08. Try/Catch blocks 08. Try/Catch blocks
try try
{ {
// //
} }
catch (...) catch (...)
{ {
// //
} }
-NOT- -NOT-
try { try {
// //
} catch(...) { } catch(...) {
// //
} }
...@@ -649,7 +649,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -649,7 +649,7 @@ indicate a place that may require attention for multi-thread safety.
Keywords such as extern, static, export, explicit, inline, etc Keywords such as extern, static, export, explicit, inline, etc
go on the line above the function name. Thus go on the line above the function name. Thus
virtual int virtual int
foo() foo()
-NOT- -NOT-
virtual int foo() virtual int foo()
...@@ -692,7 +692,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -692,7 +692,7 @@ indicate a place that may require attention for multi-thread safety.
-NOT- -NOT-
public: public:
int foo; int foo;
13. Spacing WRT return statements. 13. Spacing WRT return statements.
...@@ -751,17 +751,17 @@ indicate a place that may require attention for multi-thread safety. ...@@ -751,17 +751,17 @@ indicate a place that may require attention for multi-thread safety.
Name patterns: Name patterns:
For nonstandard names appearing in Standard headers, we are constrained For nonstandard names appearing in Standard headers, we are constrained
to use names that begin with underscores. This is called "uglification". to use names that begin with underscores. This is called "uglification".
The convention is: The convention is:
Local and argument names: __[a-z].* Local and argument names: __[a-z].*
Examples: __count __ix __s1 Examples: __count __ix __s1
Type names and template formal-argument names: _[A-Z][^_].* Type names and template formal-argument names: _[A-Z][^_].*
Examples: _Helper _CharT _N Examples: _Helper _CharT _N
Member data and function names: _M_.* Member data and function names: _M_.*
...@@ -771,7 +771,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -771,7 +771,7 @@ indicate a place that may require attention for multi-thread safety.
Examples: _S_max_elements _S_default_value Examples: _S_max_elements _S_default_value
Don't use names in the same scope that differ only in the prefix, Don't use names in the same scope that differ only in the prefix,
e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names. e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
(The most tempting of these seem to be and "_T" and "__sz".) (The most tempting of these seem to be and "_T" and "__sz".)
...@@ -781,7 +781,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -781,7 +781,7 @@ indicate a place that may require attention for multi-thread safety.
-------------------------- --------------------------
[BY EXAMPLE] [BY EXAMPLE]
#ifndef _HEADER_ #ifndef _HEADER_
#define _HEADER_ 1 #define _HEADER_ 1
...@@ -794,37 +794,37 @@ indicate a place that may require attention for multi-thread safety. ...@@ -794,37 +794,37 @@ indicate a place that may require attention for multi-thread safety.
gribble(const gribble&amp;); gribble(const gribble&amp;);
explicit explicit
gribble(int __howmany); gribble(int __howmany);
gribble&amp; gribble&amp;
operator=(const gribble&amp;); operator=(const gribble&amp;);
virtual virtual
~gribble() throw (); ~gribble() throw ();
// Start with a capital letter, end with a period. // Start with a capital letter, end with a period.
inline void inline void
public_member(const char* __arg) const; public_member(const char* __arg) const;
// In-class function definitions should be restricted to one-liners. // In-class function definitions should be restricted to one-liners.
int int
one_line() { return 0 } one_line() { return 0 }
int int
two_lines(const char* arg) two_lines(const char* arg)
{ return strchr(arg, 'a'); } { return strchr(arg, 'a'); }
inline int inline int
three_lines(); // inline, but defined below. three_lines(); // inline, but defined below.
// Note indentation. // Note indentation.
template&lt;typename _Formal_argument&gt; template&lt;typename _Formal_argument&gt;
void void
public_template() const throw(); public_template() const throw();
template&lt;typename _Iterator&gt; template&lt;typename _Iterator&gt;
void void
other_template(); other_template();
private: private:
...@@ -835,13 +835,13 @@ indicate a place that may require attention for multi-thread safety. ...@@ -835,13 +835,13 @@ indicate a place that may require attention for multi-thread safety.
_Helper* _M_helper; _Helper* _M_helper;
int _M_private_function(); int _M_private_function();
enum _Enum enum _Enum
{ {
_S_one, _S_one,
_S_two _S_two
}; };
static void static void
_S_initialize_library(); _S_initialize_library();
}; };
...@@ -871,20 +871,20 @@ indicate a place that may require attention for multi-thread safety. ...@@ -871,20 +871,20 @@ indicate a place that may require attention for multi-thread safety.
#endif /* _HEADER_ */ #endif /* _HEADER_ */
namespace std namespace std
{ {
template&lt;typename T&gt; // notice: "typename", not "class", no space template&lt;typename T&gt; // notice: "typename", not "class", no space
long_return_value_type&lt;with_many, args&gt; long_return_value_type&lt;with_many, args&gt;
function_name(char* pointer, // "char *pointer" is wrong. function_name(char* pointer, // "char *pointer" is wrong.
char* argument, char* argument,
const Reference&amp; ref) const Reference&amp; ref)
{ {
// int a_local; /* wrong; see below. */ // int a_local; /* wrong; see below. */
if (test) if (test)
{ {
nested code nested code
} }
int a_local = 0; // declare variable at first use. int a_local = 0; // declare variable at first use.
// char a, b, *p; /* wrong */ // char a, b, *p; /* wrong */
...@@ -897,12 +897,12 @@ indicate a place that may require attention for multi-thread safety. ...@@ -897,12 +897,12 @@ indicate a place that may require attention for multi-thread safety.
// ... // ...
} }
} }
gribble::gribble() gribble::gribble()
: _M_private_data(0), _M_more_stuff(0), _M_helper(0); : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
{ } { }
inline int inline int
gribble::three_lines() gribble::three_lines()
{ {
// doesn't fit in one line. // doesn't fit in one line.
...@@ -910,7 +910,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -910,7 +910,7 @@ indicate a place that may require attention for multi-thread safety.
} // namespace std } // namespace std
</literallayout> </literallayout>
</sect2> </sect2>
</sect1> </sect1>
<sect1 id="contrib.doc_style" xreflabel="Documentation Style"> <sect1 id="contrib.doc_style" xreflabel="Documentation Style">
<?dbhtml filename="documentation_style.html"?> <?dbhtml filename="documentation_style.html"?>
...@@ -932,7 +932,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -932,7 +932,7 @@ indicate a place that may require attention for multi-thread safety.
To generate the pretty pictures and hierarchy To generate the pretty pictures and hierarchy
graphs, the graphs, the
<ulink url="http://www.graphviz.org">Graphviz</ulink> <ulink url="http://www.graphviz.org">Graphviz</ulink>
package will need to be installed. package will need to be installed.
</para> </para>
</sect3> </sect3>
...@@ -1022,7 +1022,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -1022,7 +1022,7 @@ indicate a place that may require attention for multi-thread safety.
<listitem> <listitem>
<para> <para>
Use the triple-slash style only for one-line comments (the Use the triple-slash style only for one-line comments (the
<quote>brief</quote> mode). <quote>brief</quote> mode).
</para> </para>
</listitem> </listitem>
...@@ -1032,7 +1032,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -1032,7 +1032,7 @@ indicate a place that may require attention for multi-thread safety.
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
<para> <para>
Some specific guidelines: Some specific guidelines:
</para> </para>
...@@ -1071,7 +1071,7 @@ indicate a place that may require attention for multi-thread safety. ...@@ -1071,7 +1071,7 @@ indicate a place that may require attention for multi-thread safety.
* @brief A model of a linear congruential random number generator. * @brief A model of a linear congruential random number generator.
* *
* @f[ * @f[
* x_{i+1}\leftarrow(ax_{i} + c) \bmod m * x_{i+1}\leftarrow(ax_{i} + c) \bmod m
* @f] * @f]
*/ */
</literallayout> </literallayout>
...@@ -1207,11 +1207,11 @@ indicate a place that may require attention for multi-thread safety. ...@@ -1207,11 +1207,11 @@ indicate a place that may require attention for multi-thread safety.
consult the <email>libstdc++@gcc.gnu.org</email> list when consult the <email>libstdc++@gcc.gnu.org</email> list when
preparing printed manuals for current best practice and suggestions. preparing printed manuals for current best practice and suggestions.
</para> </para>
<para> <para>
Make sure that the XML documentation and markup is valid for Make sure that the XML documentation and markup is valid for
any change. This can be done easily, with the validation rules any change. This can be done easily, with the validation rules
in the <filename>Makefile</filename>, which is equivalent to doing: in the <filename>Makefile</filename>, which is equivalent to doing:
</para> </para>
<screen> <screen>
...@@ -1226,25 +1226,25 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1226,25 +1226,25 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
<para> <para>
The following Makefile rules generate (in order): an HTML The following Makefile rules generate (in order): an HTML
version of all the documentation, a PDF version of the same, a version of all the DocBook documentation, a PDF version of the same, a
single XML document, and the result of validating the entire XML single XML document, and the result of validating the entire XML
document. document.
</para> </para>
<para> <para>
<screen><userinput>make doc-html</userinput></screen> <screen><userinput>make doc-html-docbook</userinput></screen>
</para> </para>
<para> <para>
<screen><userinput>make doc-pdf</userinput></screen> <screen><userinput>make doc-pdf-docbook</userinput></screen>
</para> </para>
<para> <para>
<screen><userinput>make doc-xml-single</userinput></screen> <screen><userinput>make doc-xml-single-docbook</userinput></screen>
</para> </para>
<para> <para>
<screen><userinput>make doc-xml-validate</userinput></screen> <screen><userinput>make doc-xml-validate-docbook</userinput></screen>
</para> </para>
</sect3> </sect3>
...@@ -1259,11 +1259,11 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1259,11 +1259,11 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
libstdc++-v3/doc/xml libstdc++-v3/doc/xml
Inside this directory, the files of importance: Inside this directory, the files of importance:
spine.xml - index to documentation set spine.xml - index to documentation set
manual/spine.xml - index to manual manual/spine.xml - index to manual
manual/*.xml - individual chapters and sections of the manual manual/*.xml - individual chapters and sections of the manual
faq.xml - index to FAQ faq.xml - index to FAQ
api.xml - index to source level / API api.xml - index to source level / API
All *.txml files are template xml files, i.e., otherwise empty files with All *.txml files are template xml files, i.e., otherwise empty files with
the correct structure, suitable for filling in with new information. the correct structure, suitable for filling in with new information.
...@@ -1291,7 +1291,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1291,7 +1291,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
&lt;/chapter&gt; &lt;/chapter&gt;
&lt;/book&gt; &lt;/book&gt;
&lt;book&gt; &lt;book&gt;
&lt;part&gt; &lt;part&gt;
&lt;chapter&gt; &lt;chapter&gt;
&lt;section&gt; &lt;section&gt;
...@@ -1308,7 +1308,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1308,7 +1308,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
&lt;chapter&gt; &lt;chapter&gt;
&lt;/chapter&gt; &lt;/chapter&gt;
&lt;/part&gt; &lt;/part&gt;
&lt;/book&gt; &lt;/book&gt;
&lt;/set&gt; &lt;/set&gt;
...@@ -1321,7 +1321,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1321,7 +1321,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
<para> <para>
Complete details on Docbook markup can be found in the DocBook Complete details on Docbook markup can be found in the DocBook
Element Reference, Element Reference,
<ulink url="http://www.docbook.org/tdg/en/html/part2.html">online</ulink>. <ulink url="http://www.docbook.org/tdg/en/html/part2.html">online</ulink>.
An incomplete reference for HTML to Docbook conversion is An incomplete reference for HTML to Docbook conversion is
detailed in the table below. detailed in the table below.
</para> </para>
...@@ -1346,7 +1346,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1346,7 +1346,7 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
</row> </row>
<row> <row>
<entry>&lt;pre&gt;</entry> <entry>&lt;pre&gt;</entry>
<entry>&lt;computeroutput&gt;, &lt;programlisting&gt;, <entry>&lt;computeroutput&gt;, &lt;programlisting&gt;,
&lt;literallayout&gt;</entry> &lt;literallayout&gt;</entry>
</row> </row>
<row> <row>
...@@ -1477,7 +1477,45 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -1477,7 +1477,45 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
</sect3> </sect3>
</sect2> </sect2>
</sect1> <sect2 id="doc_style.combines">
<title>Combines</title>
<sect3 id="combines.rules">
<title>Generating Combines and Assemblages</title>
<para>
The following Makefile rules are defaults, and are usually
aliased to variable rules.
</para>
<para>
<screen><userinput>make doc-html</userinput></screen>
</para>
<para>
<screen><userinput>make doc-man</userinput></screen>
</para>
<para>
<screen><userinput>make doc-pdf</userinput></screen>
</para>
<para>
The following Makefile rules generate (in order): an HTML
version of all the DocBook documentation with links into an
local Doxygen cache, and a PDF version of the same.
</para>
<para>
<screen><userinput>make doc-html-combine</userinput></screen>
</para>
<para>
<screen><userinput>make doc-pdf-combine</userinput></screen>
</para>
</sect3>
</sect2>
</sect1>
<sect1 id="contrib.design_notes" xreflabel="Design Notes"> <sect1 id="contrib.design_notes" xreflabel="Design Notes">
<?dbhtml filename="source_design_notes.html"?> <?dbhtml filename="source_design_notes.html"?>
...@@ -2339,6 +2377,6 @@ xmllint --noout --valid <filename>xml/index.xml</filename> ...@@ -2339,6 +2377,6 @@ xmllint --noout --valid <filename>xml/index.xml</filename>
include them via "&lt;backward/hash_map.h&gt;" or "&lt;ext/hash_map&gt;" than include them via "&lt;backward/hash_map.h&gt;" or "&lt;ext/hash_map&gt;" than
to search the subdirectory itself via a "-I" directive. to search the subdirectory itself via a "-I" directive.
</literallayout> </literallayout>
</sect1> </sect1>
</appendix> </appendix>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<appendix id="appendix.free" xreflabel="Free"> <appendix id="appendix.free" xreflabel="Free">
...@@ -64,7 +64,7 @@ Given that writing good English is a rare skill among programmers, we ...@@ -64,7 +64,7 @@ Given that writing good English is a rare skill among programmers, we
can ill afford to lose manuals this way. can ill afford to lose manuals this way.
</para> </para>
<para> <para>
Free documentation, like free software, is a matter of freedom, Free documentation, like free software, is a matter of freedom,
not price. The problem with these manuals was not that O'Reilly not price. The problem with these manuals was not that O'Reilly
Associates charged a price for printed copies--that in itself is fine. Associates charged a price for printed copies--that in itself is fine.
...@@ -170,7 +170,7 @@ prefer copylefted manuals to non-copylefted ones. ...@@ -170,7 +170,7 @@ prefer copylefted manuals to non-copylefted ones.
[Note: We now maintain a <ulink url="http://www.fsf.org/licensing/doc/other-free-books.html">web page [Note: We now maintain a <ulink url="http://www.fsf.org/licensing/doc/other-free-books.html">web page
that lists free books available from other publishers</ulink>]. that lists free books available from other publishers</ulink>].
</para> </para>
<para>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</para> <para>Copyright © 2004, 2005, 2006, 2007 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA</para>
<para>Verbatim copying and distribution of this entire article are <para>Verbatim copying and distribution of this entire article are
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<appendix id="appendix.porting" xreflabel="Porting"> <appendix id="appendix.porting" xreflabel="Porting">
<?dbhtml filename="appendix_porting.html"?> <?dbhtml filename="appendix_porting.html"?>
<appendixinfo> <appendixinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -26,32 +26,32 @@ ...@@ -26,32 +26,32 @@
</title> </title>
<!-- Hacking the Build System --> <!-- Hacking the Build System -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="build_hacking.xml"> parse="xml" href="build_hacking.xml">
</xi:include> </xi:include>
<!-- Internals: Porting to New Hardware or Operating Systems --> <!-- Internals: Porting to New Hardware or Operating Systems -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="internals.xml"> parse="xml" href="internals.xml">
</xi:include> </xi:include>
<!-- Test --> <!-- Test -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="test.xml"> parse="xml" href="test.xml">
</xi:include> </xi:include>
<!-- ABI Policy and Guidelines --> <!-- ABI Policy and Guidelines -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="abi.xml"> parse="xml" href="abi.xml">
</xi:include> </xi:include>
<!-- API Evolution and Deprecation History --> <!-- API Evolution and Deprecation History -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="evolution.xml"> parse="xml" href="evolution.xml">
</xi:include> </xi:include>
<!-- Backwards Compatibility --> <!-- Backwards Compatibility -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="backwards_compatibility.xml"> parse="xml" href="backwards_compatibility.xml">
</xi:include> </xi:include>
......
<sect1 id="manual.util.memory.auto_ptr" xreflabel="auto_ptr"> <section id="std.util.memory.auto_ptr" xreflabel="auto_ptr">
<?dbhtml filename="auto_ptr.html"?> <?dbhtml filename="auto_ptr.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
auto_ptr auto_ptr
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>auto_ptr</title> <title>auto_ptr</title>
<sect2 id="auto_ptr.limitations"> <section id="auto_ptr.limitations">
<title>Limitations</title> <title>Limitations</title>
<para>Explaining all of the fun and delicious things that can <para>Explaining all of the fun and delicious things that can
...@@ -48,11 +48,11 @@ ...@@ -48,11 +48,11 @@
void func (int data) void func (int data)
{ {
APMC ap (new MyClass(data)); APMC ap (new MyClass(data));
some_throwable_function(); // this will throw an exception some_throwable_function(); // this will throw an exception
function_taking_MyClass_pointer (ap.get()); function_taking_MyClass_pointer (ap.get());
} }
</programlisting> </programlisting>
<para>When an exception gets thrown, the instance of MyClass that's <para>When an exception gets thrown, the instance of MyClass that's
...@@ -62,15 +62,15 @@ ...@@ -62,15 +62,15 @@
<para>Changing that code as follows is not <acronym>AP</acronym>-friendly: <para>Changing that code as follows is not <acronym>AP</acronym>-friendly:
</para> </para>
<programlisting> <programlisting>
APMC ap (new MyClass[22]); APMC ap (new MyClass[22]);
</programlisting> </programlisting>
<para>You will get the same problems as you would without the use <para>You will get the same problems as you would without the use
of <acronym>AP</acronym>: of <acronym>AP</acronym>:
</para> </para>
<programlisting> <programlisting>
char* array = new char[10]; // array new... char* array = new char[10]; // array new...
... ...
delete array; // ...but single-object delete delete array; // ...but single-object delete
</programlisting> </programlisting>
<para> <para>
AP cannot tell whether the pointer you've passed at creation points AP cannot tell whether the pointer you've passed at creation points
...@@ -79,21 +79,21 @@ ...@@ -79,21 +79,21 @@
own <code>auto_array_ptr</code> for that situation (in fact, this has own <code>auto_array_ptr</code> for that situation (in fact, this has
been done many times; check the mailing lists, Usenet, Boost, etc). been done many times; check the mailing lists, Usenet, Boost, etc).
</para> </para>
</sect2> </section>
<sect2 id="auto_ptr.using"> <section id="auto_ptr.using">
<title>Use in Containers</title> <title>Use in Containers</title>
<para> <para>
</para> </para>
<para>All of the <link linkend="manual.containers">containers</link> <para>All of the <link linkend="std.containers">containers</link>
described in the standard library require their contained types described in the standard library require their contained types
to have, among other things, a copy constructor like this: to have, among other things, a copy constructor like this:
</para> </para>
<programlisting> <programlisting>
struct My_Type struct My_Type
{ {
My_Type (My_Type const&amp;); My_Type (My_Type const&amp;);
}; };
</programlisting> </programlisting>
<para> <para>
...@@ -119,15 +119,15 @@ ...@@ -119,15 +119,15 @@
<programlisting> <programlisting>
#include &lt;vector&gt; #include &lt;vector&gt;
#include &lt;memory&gt; #include &lt;memory&gt;
void f() void f()
{ {
std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int; std::vector&lt; std::auto_ptr&lt;int&gt; &gt; vec_ap_int;
} }
</programlisting> </programlisting>
<para> <para>
Should you try this with the checks enabled, you will see an error. Should you try this with the checks enabled, you will see an error.
</para> </para>
</sect2> </section>
</sect1> </section>
<sect1 id="manual.ext.allocator.bitmap" xreflabel="bitmap_allocator"> <sect1 id="manual.ext.allocator.bitmap" xreflabel="bitmap_allocator">
<?dbhtml filename="bitmap_allocator.html"?> <?dbhtml filename="bitmap_allocator.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
the search would go up given an increasing size, for 64 entries the search would go up given an increasing size, for 64 entries
however, lg(64) == 6 comparisons are enough to locate the correct however, lg(64) == 6 comparisons are enough to locate the correct
free list if it exists. free list if it exists.
</para> </para>
<para> <para>
Suppose the free list size has reached it's threshold, then the Suppose the free list size has reached it's threshold, then the
largest block from among those in the list and the new block will largest block from among those in the list and the new block will
...@@ -223,7 +223,7 @@ else return false.</para></listitem> ...@@ -223,7 +223,7 @@ else return false.</para></listitem>
<sect3 id="bitmap.impl.max_wasted" xreflabel="Max Wasted Percentage"> <sect3 id="bitmap.impl.max_wasted" xreflabel="Max Wasted Percentage">
<title>Maximum Wasted Percentage</title> <title>Maximum Wasted Percentage</title>
<para> <para>
This has nothing to do with the algorithm per-se, This has nothing to do with the algorithm per-se,
only with some vales that must be chosen correctly to ensure that the only with some vales that must be chosen correctly to ensure that the
...@@ -328,12 +328,12 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524% ...@@ -328,12 +328,12 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
<listitem> <listitem>
<para> <para>
Gets more memory from the Global Free List of the Required Gets more memory from the Global Free List of the Required
size. size.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Adjusts the size for the next call to itself. Adjusts the size for the next call to itself.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -344,7 +344,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524% ...@@ -344,7 +344,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
<listitem> <listitem>
<para> <para>
Sets the use count for that super-block just allocated to 0 Sets the use count for that super-block just allocated to 0
(zero). (zero).
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -353,7 +353,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524% ...@@ -353,7 +353,7 @@ For map/multimap: k = 12, and c = 4 (int and double), we get: 37.524%
for the allocator. If the invariant is maintained, we are for the allocator. If the invariant is maintained, we are
sure that all is well. Now, the same process is applied on sure that all is well. Now, the same process is applied on
the newly acquired free blocks, which are dispatched the newly acquired free blocks, which are dispatched
accordingly. accordingly.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -378,7 +378,7 @@ single object allocations. ...@@ -378,7 +378,7 @@ single object allocations.
<para> <para>
However for n == 1, a series of steps are performed: However for n == 1, a series of steps are performed:
</para> </para>
<orderedlist> <orderedlist>
<listitem><para> <listitem><para>
We first need to locate that super-block which holds the memory We first need to locate that super-block which holds the memory
...@@ -504,7 +504,7 @@ Block a bitmap as well? ...@@ -504,7 +504,7 @@ Block a bitmap as well?
testing, I've decided to keep these bitmaps close to the actual testing, I've decided to keep these bitmaps close to the actual
blocks. This will help in 2 ways. blocks. This will help in 2 ways.
</para> </para>
<orderedlist> <orderedlist>
<listitem><para>Constant time access for the bitmap themselves, since no kind of <listitem><para>Constant time access for the bitmap themselves, since no kind of
look up will be needed to find the correct bitmap list or it's look up will be needed to find the correct bitmap list or it's
...@@ -555,5 +555,5 @@ equivalent.</para></listitem> ...@@ -555,5 +555,5 @@ equivalent.</para></listitem>
</sect3> </sect3>
</sect2> </sect2>
</sect1> </sect1>
<sect1 id="appendix.porting.build_hacking" xreflabel="Build Hacking"> <sect1 id="appendix.porting.build_hacking" xreflabel="Build Hacking">
<?dbhtml filename="build_hacking.html"?> <?dbhtml filename="build_hacking.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<sect2 id="build_hacking.prereq"> <sect2 id="build_hacking.prereq">
<title>Prerequisites</title> <title>Prerequisites</title>
<para> <para>
As noted <ulink As noted <ulink
url="http://gcc.gnu.org/install/prerequisites.html">previously</ulink>, url="http://gcc.gnu.org/install/prerequisites.html">previously</ulink>,
certain other tools are necessary for hacking on files that certain other tools are necessary for hacking on files that
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<sect2 id="build_hacking.map"> <sect2 id="build_hacking.map">
<title>Overview: What Comes from Where</title> <title>Overview: What Comes from Where</title>
<screen> <screen>
<inlinemediaobject> <inlinemediaobject>
<imageobject> <imageobject>
......
<sect1 id="manual.localization.facet.codecvt" xreflabel="codecvt"> <section id="std.localization.facet.codecvt" xreflabel="codecvt">
<?dbhtml filename="codecvt.html"?> <?dbhtml filename="codecvt.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
codecvt codecvt
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>codecvt</title> <title>codecvt</title>
...@@ -30,7 +30,7 @@ specializations for wide and narrow characters and the ...@@ -30,7 +30,7 @@ specializations for wide and narrow characters and the
implementation-provided extended functionality are given. implementation-provided extended functionality are given.
</para> </para>
<sect2 id="facet.codecvt.req"> <section id="facet.codecvt.req">
<title>Requirements</title> <title>Requirements</title>
<para> <para>
...@@ -108,12 +108,12 @@ Two: The required conversions, by specifying mbstate_t as the third ...@@ -108,12 +108,12 @@ Two: The required conversions, by specifying mbstate_t as the third
template parameter, imply an implementation strategy that is mostly template parameter, imply an implementation strategy that is mostly
(or wholly) based on the underlying C library, and the functions (or wholly) based on the underlying C library, and the functions
mcsrtombs and wcsrtombs in particular.</para> mcsrtombs and wcsrtombs in particular.</para>
</sect2> </section>
<sect2 id="facet.codecvt.design"> <section id="facet.codecvt.design">
<title>Design</title> <title>Design</title>
<sect3 id="codecvt.design.wchar_t_size"> <section id="codecvt.design.wchar_t_size">
<title><type>wchar_t</type> Size</title> <title><type>wchar_t</type> Size</title>
<para> <para>
...@@ -131,9 +131,9 @@ mcsrtombs and wcsrtombs in particular.</para> ...@@ -131,9 +131,9 @@ mcsrtombs and wcsrtombs in particular.</para>
<para> <para>
Thus, portable C++ code cannot assume a byte size (or endianness) either. Thus, portable C++ code cannot assume a byte size (or endianness) either.
</para> </para>
</sect3> </section>
<sect3 id="codecvt.design.unicode"> <section id="codecvt.design.unicode">
<title>Support for Unicode</title> <title>Support for Unicode</title>
<para> <para>
Probably the most frequently asked question about code conversion Probably the most frequently asked question about code conversion
...@@ -236,9 +236,9 @@ mechanism may be required. ...@@ -236,9 +236,9 @@ mechanism may be required.
external types will need to be known. external types will need to be known.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</sect3> </section>
<sect3 id="codecvt.design.issues"> <section id="codecvt.design.issues">
<title>Other Issues</title> <title>Other Issues</title>
<para> <para>
In addition, multi-threaded and multi-locale environments also impact In addition, multi-threaded and multi-locale environments also impact
...@@ -284,11 +284,11 @@ on GNU/Linux) and whatever the currently selected locale for the ...@@ -284,11 +284,11 @@ on GNU/Linux) and whatever the currently selected locale for the
LC_CTYPE category implements. LC_CTYPE category implements.
</para> </para>
</sect3> </section>
</sect2> </section>
<sect2 id="facet.codecvt.impl"> <section id="facet.codecvt.impl">
<title>Implementation</title> <title>Implementation</title>
<para> <para>
...@@ -432,9 +432,9 @@ external character type, encoding_state&gt; is consistent with other ...@@ -432,9 +432,9 @@ external character type, encoding_state&gt; is consistent with other
codecvt usage. codecvt usage.
</para> </para>
</sect2> </section>
<sect2 id="facet.codecvt.use"> <section id="facet.codecvt.use">
<title>Use</title> <title>Use</title>
<para>A conversions involving string literal.</para> <para>A conversions involving string literal.</para>
...@@ -477,9 +477,9 @@ codecvt usage. ...@@ -477,9 +477,9 @@ codecvt usage.
VERIFY( ito_next == i_arr + size ); VERIFY( ito_next == i_arr + size );
</programlisting> </programlisting>
</sect2> </section>
<sect2 id="facet.codecvt.future"> <section id="facet.codecvt.future">
<title>Future</title> <title>Future</title>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
...@@ -532,7 +532,7 @@ codecvt usage. ...@@ -532,7 +532,7 @@ codecvt usage.
</itemizedlist> </itemizedlist>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect2> </section>
<bibliography id="facet.codecvt.biblio"> <bibliography id="facet.codecvt.biblio">
...@@ -702,4 +702,4 @@ codecvt usage. ...@@ -702,4 +702,4 @@ codecvt usage.
</bibliography> </bibliography>
</sect1> </section>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<chapter id="manual.ext.concurrency" xreflabel="Concurrency Extensions"> <chapter id="manual.ext.concurrency" xreflabel="Concurrency Extensions">
...@@ -85,7 +85,7 @@ critical sections, while retaining exception-safety. ...@@ -85,7 +85,7 @@ critical sections, while retaining exception-safety.
<para> <para>
Two functions and one type form the base of atomic support. Two functions and one type form the base of atomic support.
</para> </para>
...@@ -130,7 +130,7 @@ __atomic_add_dispatch ...@@ -130,7 +130,7 @@ __atomic_add_dispatch
<para> <para>
These functions forward to one of several specialized helper These functions forward to one of several specialized helper
functions, depending on the circumstances. For instance, functions, depending on the circumstances. For instance,
</para> </para>
<para> <para>
...@@ -152,7 +152,7 @@ sequence. ...@@ -152,7 +152,7 @@ sequence.
</para> </para>
</listitem> </listitem>
<listitem><para><code>__exchange_and_add_single</code> <listitem><para><code>__exchange_and_add_single</code>
</para> </para>
<para>Single threaded version. Inlined.</para> <para>Single threaded version. Inlined.</para>
</listitem> </listitem>
...@@ -173,12 +173,12 @@ In addition, there are two macros ...@@ -173,12 +173,12 @@ In addition, there are two macros
<para> <para>
<code> <code>
_GLIBCXX_READ_MEM_BARRIER _GLIBCXX_READ_MEM_BARRIER
</code> </code>
</para> </para>
<para> <para>
<code> <code>
_GLIBCXX_WRITE_MEM_BARRIER _GLIBCXX_WRITE_MEM_BARRIER
</code> </code>
</para> </para>
...@@ -195,7 +195,7 @@ host hardware and operating system. ...@@ -195,7 +195,7 @@ host hardware and operating system.
<title>Implementation</title> <title>Implementation</title>
<sect2 id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F"> <sect2 id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F">
<title>Using Builtin Atomic Functions</title> <title>Using Builtin Atomic Functions</title>
<para>The functions for atomic operations described above are either <para>The functions for atomic operations described above are either
implemented via compiler intrinsics (if the underlying host is implemented via compiler intrinsics (if the underlying host is
capable) or by library fallbacks.</para> capable) or by library fallbacks.</para>
...@@ -214,7 +214,7 @@ usage vary depending on the target hardware and the flags used during ...@@ -214,7 +214,7 @@ usage vary depending on the target hardware and the flags used during
compile. compile.
</para> </para>
<para> <para>
If builtins are possible for bool-sized integral types, If builtins are possible for bool-sized integral types,
<code>_GLIBCXX_ATOMIC_BUILTINS_1</code> will be defined. <code>_GLIBCXX_ATOMIC_BUILTINS_1</code> will be defined.
If builtins are possible for int-sized integral types, If builtins are possible for int-sized integral types,
...@@ -285,7 +285,7 @@ including <code>pthread_t</code>, <code>pthread_once_t</code>, <code>pthread_cre ...@@ -285,7 +285,7 @@ including <code>pthread_t</code>, <code>pthread_once_t</code>, <code>pthread_cre
etc. etc.
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
<sect1 id="manual.ext.concurrency.use" xreflabel="Use"> <sect1 id="manual.ext.concurrency.use" xreflabel="Use">
......
<sect1 id="manual.intro.setup.configure" xreflabel="Configuring"> <sect1 id="manual.intro.setup.configure" xreflabel="Configuring">
<?dbhtml filename="configure.html"?> <?dbhtml filename="configure.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -43,71 +43,71 @@ ...@@ -43,71 +43,71 @@
<variablelist> <variablelist>
<varlistentry><term><code>--enable-multilib</code>[default]</term> <varlistentry><term><code>--enable-multilib</code>[default]</term>
<listitem><para>This is part of the generic multilib support for building cross <listitem><para>This is part of the generic multilib support for building cross
compilers. As such, targets like &quot;powerpc-elf&quot; will have compilers. As such, targets like &quot;powerpc-elf&quot; will have
libstdc++ built many different ways: &quot;-msoft-float&quot; libstdc++ built many different ways: &quot;-msoft-float&quot;
and not, etc. A different libstdc++ will be built for each of and not, etc. A different libstdc++ will be built for each of
the different multilib versions. This option is on by default. the different multilib versions. This option is on by default.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-sjlj-exceptions</code></term> <varlistentry><term><code>--enable-sjlj-exceptions</code></term>
<listitem><para>Forces old, set-jump/long-jump exception handling model. If <listitem><para>Forces old, set-jump/long-jump exception handling model. If
at all possible, the new, frame unwinding exception handling routines at all possible, the new, frame unwinding exception handling routines
should be used instead, as they significantly reduce both should be used instead, as they significantly reduce both
runtime memory usage and executable size. This option can runtime memory usage and executable size. This option can
change the library ABI. change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-version-specific-runtime-libs</code></term> <varlistentry><term><code>--enable-version-specific-runtime-libs</code></term>
<listitem><para>Specify that run-time libraries should be installed in the <listitem><para>Specify that run-time libraries should be installed in the
compiler-specific subdirectory (i.e., compiler-specific subdirectory (i.e.,
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>) <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}</code>)
instead of <code>${libdir}</code>. This option is useful if you instead of <code>${libdir}</code>. This option is useful if you
intend to use several versions of gcc in parallel. In addition, intend to use several versions of gcc in parallel. In addition,
libstdc++'s include files will be installed in libstdc++'s include files will be installed in
<code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>, <code>${libdir}/gcc-lib/${target_alias}/${gcc_version}/include/g++</code>,
unless you also specify unless you also specify
<literal>--with-gxx-include-dir=<filename class="directory">dirname</filename></literal> during configuration. <literal>--with-gxx-include-dir=<filename class="directory">dirname</filename></literal> during configuration.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></term> <varlistentry><term><code>--with-gxx-include-dir=&lt;include-files dir&gt;</code></term>
<listitem><para>Adds support for named libstdc++ include directory. For instance, <listitem><para>Adds support for named libstdc++ include directory. For instance,
the following puts all the libstdc++ headers into a directory the following puts all the libstdc++ headers into a directory
called &quot;4.4-20090404&quot; instead of the usual called &quot;4.4-20090404&quot; instead of the usual
&quot;c++/(version)&quot;. &quot;c++/(version)&quot;.
</para> </para>
<programlisting> <programlisting>
--with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/4.4-20090404</programlisting> </listitem></varlistentry> --with-gxx-include-dir=/foo/H-x86-gcc-3-c-gxx-inc/include/4.4-20090404</programlisting> </listitem></varlistentry>
<varlistentry><term><code>--enable-cstdio</code></term> <varlistentry><term><code>--enable-cstdio</code></term>
<listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code> <listitem><para>This is an abbreviated form of <code>'--enable-cstdio=stdio'</code>
(described next). (described next).
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-cstdio=OPTION</code></term> <varlistentry><term><code>--enable-cstdio=OPTION</code></term>
<listitem><para>Select a target-specific I/O package. At the moment, the only <listitem><para>Select a target-specific I/O package. At the moment, the only
choice is to use 'stdio', a generic &quot;C&quot; abstraction. choice is to use 'stdio', a generic &quot;C&quot; abstraction.
The default is 'stdio'. This option can change the library ABI. The default is 'stdio'. This option can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-clocale</code></term> <varlistentry><term><code>--enable-clocale</code></term>
<listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code> <listitem><para>This is an abbreviated form of <code>'--enable-clocale=generic'</code>
(described next). (described next).
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-clocale=OPTION</code></term> <varlistentry><term><code>--enable-clocale=OPTION</code></term>
<listitem><para>Select a target-specific underlying locale package. The <listitem><para>Select a target-specific underlying locale package. The
choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix choices are 'ieee_1003.1-2001' to specify an X/Open, Standard Unix
(IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets, (IEEE Std. 1003.1-2001) model based on langinfo/iconv/catgets,
'gnu' to specify a model based on functionality from the GNU C 'gnu' to specify a model based on functionality from the GNU C
library (langinfo/iconv/gettext) (from <ulink url="http://sources.redhat.com/glibc/">glibc</ulink>, the GNU C library (langinfo/iconv/gettext) (from <ulink url="http://sources.redhat.com/glibc/">glibc</ulink>, the GNU C
library), or 'generic' to use a generic &quot;C&quot; library), or 'generic' to use a generic &quot;C&quot;
abstraction which consists of &quot;C&quot; locale info. abstraction which consists of &quot;C&quot; locale info.
</para> </para>
<para>If not explicitly specified, the configure proccess tries <para>If not explicitly specified, the configure proccess tries
...@@ -121,146 +121,146 @@ ...@@ -121,146 +121,146 @@
<varlistentry><term><code>--enable-libstdcxx-allocator</code></term> <varlistentry><term><code>--enable-libstdcxx-allocator</code></term>
<listitem><para>This is an abbreviated form of <listitem><para>This is an abbreviated form of
<code>'--enable-libstdcxx-allocator=auto'</code> (described <code>'--enable-libstdcxx-allocator=auto'</code> (described
next). next).
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term> <varlistentry><term><code>--enable-libstdcxx-allocator=OPTION </code></term>
<listitem><para>Select a target-specific underlying std::allocator. The <listitem><para>Select a target-specific underlying std::allocator. The
choices are 'new' to specify a wrapper for new, 'malloc' to choices are 'new' to specify a wrapper for new, 'malloc' to
specify a wrapper for malloc, 'mt' for a fixed power of two allocator, specify a wrapper for malloc, 'mt' for a fixed power of two allocator,
'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator. 'pool' for the SGI pooled allocator or 'bitmap' for a bitmap allocator.
See this page for more information on allocator See this page for more information on allocator
<link linkend="allocator.ext">extensions</link>. This option <link linkend="allocator.ext">extensions</link>. This option
can change the library ABI. can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-cheaders=OPTION</code></term> <varlistentry><term><code>--enable-cheaders=OPTION</code></term>
<listitem><para>This allows the user to define the approach taken for C header <listitem><para>This allows the user to define the approach taken for C header
compatibility with C++. Options are c, c_std, and c_global. compatibility with C++. Options are c, c_std, and c_global.
These correspond to the source directory's include/c, These correspond to the source directory's include/c,
include/c_std, and include/c_global, and may also include include/c_std, and include/c_global, and may also include
include/c_compatibility. The default is 'c_global'. include/c_compatibility. The default is 'c_global'.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-threads</code></term> <varlistentry><term><code>--enable-threads</code></term>
<listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code> <listitem><para>This is an abbreviated form of <code>'--enable-threads=yes'</code>
(described next). (described next).
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-threads=OPTION</code></term> <varlistentry><term><code>--enable-threads=OPTION</code></term>
<listitem><para>Select a threading library. A full description is <listitem><para>Select a threading library. A full description is
given in the given in the
general <ulink url="http://gcc.gnu.org/install/configure.html">compiler general <ulink url="http://gcc.gnu.org/install/configure.html">compiler
configuration instructions</ulink>. This option can change the configuration instructions</ulink>. This option can change the
library ABI. library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-libstdcxx-debug</code></term> <varlistentry><term><code>--enable-libstdcxx-debug</code></term>
<listitem><para>Build separate debug libraries in addition to what is normally built. <listitem><para>Build separate debug libraries in addition to what is normally built.
By default, the debug libraries are compiled with By default, the debug libraries are compiled with
<code> CXXFLAGS='-g3 -O0 -fno-inline'</code> <code> CXXFLAGS='-g3 -O0 -fno-inline'</code>
, are installed in <code>${libdir}/debug</code>, and have the , are installed in <code>${libdir}/debug</code>, and have the
same names and versioning information as the non-debug same names and versioning information as the non-debug
libraries. This option is off by default. libraries. This option is off by default.
</para> </para>
<para>Note this make command, executed in <para>Note this make command, executed in
the build directory, will do much the same thing, without the the build directory, will do much the same thing, without the
configuration difference and without building everything twice: configuration difference and without building everything twice:
<code>make CXXFLAGS='-g3 -O0 -fno-inline' all</code> <code>make CXXFLAGS='-g3 -O0 -fno-inline' all</code>
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term> <varlistentry><term><code>--enable-libstdcxx-debug-flags=FLAGS</code></term>
<listitem><para>This option is only valid when <code> --enable-debug </code> <listitem><para>This option is only valid when <code> --enable-debug </code>
is also specified, and applies to the debug builds only. With is also specified, and applies to the debug builds only. With
this option, you can pass a specific string of flags to the this option, you can pass a specific string of flags to the
compiler to use when building the debug versions of libstdc++. compiler to use when building the debug versions of libstdc++.
FLAGS is a quoted string of options, like FLAGS is a quoted string of options, like
</para> </para>
<programlisting> <programlisting>
--enable-libstdcxx-debug-flags='-g3 -O1 -fno-inline'</programlisting> --enable-libstdcxx-debug-flags='-g3 -O1 -fno-inline'</programlisting>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term> <varlistentry><term><code>--enable-cxx-flags=FLAGS</code></term>
<listitem><para>With this option, you can pass a string of -f (functionality) <listitem><para>With this option, you can pass a string of -f (functionality)
flags to the compiler to use when building libstdc++. This flags to the compiler to use when building libstdc++. This
option can change the library ABI. FLAGS is a quoted string of option can change the library ABI. FLAGS is a quoted string of
options, like options, like
</para> </para>
<programlisting> <programlisting>
--enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting> --enable-cxx-flags='-fvtable-gc -fomit-frame-pointer -ansi'</programlisting>
<para> <para>
Note that the flags don't necessarily have to all be -f flags, Note that the flags don't necessarily have to all be -f flags,
as shown, but usually those are the ones that will make sense as shown, but usually those are the ones that will make sense
for experimentation and configure-time overriding. for experimentation and configure-time overriding.
</para> </para>
<para>The advantage of --enable-cxx-flags over setting CXXFLAGS in <para>The advantage of --enable-cxx-flags over setting CXXFLAGS in
the 'make' environment is that, if files are automatically the 'make' environment is that, if files are automatically
rebuilt, the same flags will be used when compiling those files rebuilt, the same flags will be used when compiling those files
as well, so that everything matches. as well, so that everything matches.
</para> </para>
<para>Fun flags to try might include combinations of <para>Fun flags to try might include combinations of
</para> </para>
<programlisting> <programlisting>
-fstrict-aliasing -fstrict-aliasing
-fno-exceptions -fno-exceptions
-ffunction-sections -ffunction-sections
-fvtable-gc</programlisting> -fvtable-gc</programlisting>
<para>and opposite forms (-fno-) of the same. Tell us (the libstdc++ <para>and opposite forms (-fno-) of the same. Tell us (the libstdc++
mailing list) if you discover more! mailing list) if you discover more!
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-c99</code></term> <varlistentry><term><code>--enable-c99</code></term>
<listitem><para>The &quot;long long&quot; type was introduced in C99, along <listitem><para>The &quot;long long&quot; type was introduced in C99, along
with many other functions for wide characters, and math with many other functions for wide characters, and math
classification macros, etc. If enabled, all C99 functions not classification macros, etc. If enabled, all C99 functions not
specified by the C++ standard will be put into <code>namespace specified by the C++ standard will be put into <code>namespace
__gnu_cxx</code>, and then all these names will __gnu_cxx</code>, and then all these names will
be injected into namespace std, so that C99 functions can be be injected into namespace std, so that C99 functions can be
used &quot;as if&quot; they were in the C++ standard (as they used &quot;as if&quot; they were in the C++ standard (as they
will eventually be in some future revision of the standard, will eventually be in some future revision of the standard,
without a doubt). By default, C99 support is on, assuming the without a doubt). By default, C99 support is on, assuming the
configure probes find all the necessary functions and bits configure probes find all the necessary functions and bits
necessary. This option can change the library ABI. necessary. This option can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-wchar_t</code>[default]</term> <varlistentry><term><code>--enable-wchar_t</code>[default]</term>
<listitem><para>Template specializations for the &quot;wchar_t&quot; type are <listitem><para>Template specializations for the &quot;wchar_t&quot; type are
required for wide character conversion support. Disabling required for wide character conversion support. Disabling
wide character specializations may be expedient for initial wide character specializations may be expedient for initial
porting efforts, but builds only a subset of what is required by porting efforts, but builds only a subset of what is required by
ISO, and is not recommended. By default, this option is on. ISO, and is not recommended. By default, this option is on.
This option can change the library ABI. This option can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-long-long </code></term> <varlistentry><term><code>--enable-long-long </code></term>
<listitem><para>The &quot;long long&quot; type was introduced in C99. It is <listitem><para>The &quot;long long&quot; type was introduced in C99. It is
provided as a GNU extension to C++98 in g++. This flag builds provided as a GNU extension to C++98 in g++. This flag builds
support for &quot;long long&quot; into the library (specialized support for &quot;long long&quot; into the library (specialized
templates and the like for iostreams). This option is on by default: templates and the like for iostreams). This option is on by default:
if enabled, users will have to either use the new-style &quot;C&quot; if enabled, users will have to either use the new-style &quot;C&quot;
headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;) headers by default (i.e., &lt;cmath&gt; not &lt;math.h&gt;)
or add appropriate compile-time flags to all compile lines to or add appropriate compile-time flags to all compile lines to
allow &quot;C&quot; visibility of this feature (on GNU/Linux, allow &quot;C&quot; visibility of this feature (on GNU/Linux,
the flag is -D_ISOC99_SOURCE, which is added automatically via the flag is -D_ISOC99_SOURCE, which is added automatically via
CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE). CPLUSPLUS_CPP_SPEC's addition of _GNU_SOURCE).
This option can change the library ABI. This option can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-fully-dynamic-string</code></term> <varlistentry><term><code>--enable-fully-dynamic-string</code></term>
<listitem><para>This option enables a special version of basic_string avoiding <listitem><para>This option enables a special version of basic_string avoiding
the optimization that allocates empty objects in static memory. the optimization that allocates empty objects in static memory.
Mostly useful together with shared memory allocators, see PR Mostly useful together with shared memory allocators, see PR
libstdc++/16612 for details. libstdc++/16612 for details.
</para> </para>
...@@ -268,48 +268,48 @@ ...@@ -268,48 +268,48 @@
<varlistentry><term><code>--enable-concept-checks</code></term> <varlistentry><term><code>--enable-concept-checks</code></term>
<listitem><para>This turns on additional compile-time checks for instantiated <listitem><para>This turns on additional compile-time checks for instantiated
library templates, in the form of specialized templates, library templates, in the form of specialized templates,
<link linkend="manual.diagnostics.concept_checking">described here</link>. They <link linkend="std.diagnostics.concept_checking">described here</link>. They
can help users discover when they break the rules of the STL, before can help users discover when they break the rules of the STL, before
their programs run. their programs run.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-symvers[=style]</code></term> <varlistentry><term><code>--enable-symvers[=style]</code></term>
<listitem><para>In 3.1 and later, tries to turn on symbol versioning in the <listitem><para>In 3.1 and later, tries to turn on symbol versioning in the
shared library (if a shared library has been shared library (if a shared library has been
requested). Values for 'style' that are currently supported requested). Values for 'style' that are currently supported
are 'gnu', 'gnu-versioned-namespace', 'darwin', and are 'gnu', 'gnu-versioned-namespace', 'darwin', and
'darwin-export'. Both gnu- options require that a recent 'darwin-export'. Both gnu- options require that a recent
version of the GNU linker be in use. Both darwin options are version of the GNU linker be in use. Both darwin options are
equivalent. With no style given, the configure script will try equivalent. With no style given, the configure script will try
to guess correct defaults for the host system, probe to see if to guess correct defaults for the host system, probe to see if
additional requirements are necessary and present for additional requirements are necessary and present for
activation, and if so, will turn symbol versioning on. This activation, and if so, will turn symbol versioning on. This
option can change the library ABI. option can change the library ABI.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-visibility</code></term> <varlistentry><term><code>--enable-visibility</code></term>
<listitem><para> In 4.2 and later, enables or disables visibility attributes. <listitem><para> In 4.2 and later, enables or disables visibility attributes.
If enabled (as by default), and the compiler seems capable of If enabled (as by default), and the compiler seems capable of
passing the simple sanity checks thrown at it, adjusts items passing the simple sanity checks thrown at it, adjusts items
in namespace std, namespace std::tr1, and namespace __gnu_cxx in namespace std, namespace std::tr1, and namespace __gnu_cxx
so that -fvisibility options work. so that -fvisibility options work.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-libstdcxx-pch</code></term> <varlistentry><term><code>--enable-libstdcxx-pch</code></term>
<listitem><para>In 3.4 and later, tries to turn on the generation of <listitem><para>In 3.4 and later, tries to turn on the generation of
stdc++.h.gch, a pre-compiled file including all the standard stdc++.h.gch, a pre-compiled file including all the standard
C++ includes. If enabled (as by default), and the compiler C++ includes. If enabled (as by default), and the compiler
seems capable of passing the simple sanity checks thrown at seems capable of passing the simple sanity checks thrown at
it, try to build stdc++.h.gch as part of the make process. it, try to build stdc++.h.gch as part of the make process.
In addition, this generated file is used later on (by appending <code> In addition, this generated file is used later on (by appending <code>
--include bits/stdc++.h </code> to CXXFLAGS) when running the --include bits/stdc++.h </code> to CXXFLAGS) when running the
testsuite. testsuite.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
...@@ -326,23 +326,23 @@ ...@@ -326,23 +326,23 @@
<varlistentry><term><code>--enable-clock-gettime</code></term> <varlistentry><term><code>--enable-clock-gettime</code></term>
<listitem><para>This is an abbreviated form of <listitem><para>This is an abbreviated form of
<code>'--enable-clock-gettime=yes'</code>(described next). <code>'--enable-clock-gettime=yes'</code>(described next).
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
<varlistentry><term><code>--enable-libstdcxx-time=OPTION</code></term> <varlistentry><term><code>--enable-libstdcxx-time=OPTION</code></term>
<listitem><para>Enables link-type checks for the availability of the <listitem><para>Enables link-type checks for the availability of the
clock_gettime clocks, used in the implementation of [time.clock], clock_gettime clocks, used in the implementation of [time.clock],
and of the nanosleep and sched_yield functions, used in the and of the nanosleep and sched_yield functions, used in the
implementation of [thread.thread.this] of the current C++0x draft. implementation of [thread.thread.this] of the current C++0x draft.
The choice OPTION=yes checks for the availability of the facilities The choice OPTION=yes checks for the availability of the facilities
in libc and libposix4. In case of need the latter is also linked in libc and libposix4. In case of need the latter is also linked
to libstdc++ as part of the build process. OPTION=rt also searches to libstdc++ as part of the build process. OPTION=rt also searches
(and, in case, links) librt. Note that the latter is not always (and, in case, links) librt. Note that the latter is not always
desirable because, in glibc, for example, in turn it triggers the desirable because, in glibc, for example, in turn it triggers the
linking of libpthread too, which activates locking, a large overhead linking of libpthread too, which activates locking, a large overhead
for single-thread programs. OPTION=no skips the tests completely. for single-thread programs. OPTION=no skips the tests completely.
The default is OPTION=no. The default is OPTION=no.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.containers" xreflabel="Containers"> <chapter id="std.containers" xreflabel="Containers">
<?dbhtml filename="containers.html"?> <?dbhtml filename="containers.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,22 +15,22 @@ ...@@ -15,22 +15,22 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Containers Containers
<indexterm><primary>Containers</primary></indexterm> <indexterm><primary>Containers</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Sequences --> <!-- Sect1 01 : Sequences -->
<chapter id="manual.containers.sequences" xreflabel="Sequences"> <sect1 id="std.containers.sequences" xreflabel="Sequences">
<?dbhtml filename="sequences.html"?> <?dbhtml filename="sequences.html"?>
<title>Sequences</title> <title>Sequences</title>
<sect1 id="containers.sequences.list" xreflabel="list"> <sect2 id="containers.sequences.list" xreflabel="list">
<?dbhtml filename="list.html"?> <?dbhtml filename="list.html"?>
<title>list</title> <title>list</title>
<sect2 id="sequences.list.size" xreflabel="list::size() is O(n)"> <sect3 id="sequences.list.size" xreflabel="list::size() is O(n)">
<title>list::size() is O(n)</title> <title>list::size() is O(n)</title>
<para> <para>
Yes it is, and that's okay. This is a decision that we preserved Yes it is, and that's okay. This is a decision that we preserved
...@@ -64,29 +64,29 @@ ...@@ -64,29 +64,29 @@
<para> <para>
One implication of linear time size(): you should never write One implication of linear time size(): you should never write
</para> </para>
<programlisting> <programlisting>
if (L.size() == 0) if (L.size() == 0)
... ...
</programlisting> </programlisting>
<para> <para>
Instead, you should write Instead, you should write
</para> </para>
<programlisting> <programlisting>
if (L.empty()) if (L.empty())
... ...
</programlisting> </programlisting>
</blockquote> </blockquote>
</sect2> </sect3>
</sect1> </sect2>
<sect1 id="containers.sequences.vector" xreflabel="vector"> <sect2 id="containers.sequences.vector" xreflabel="vector">
<?dbhtml filename="vector.html"?> <?dbhtml filename="vector.html"?>
<title>vector</title> <title>vector</title>
<para> <para>
</para> </para>
<sect2 id="sequences.vector.management" xreflabel="Space Overhead Management"> <sect3 id="sequences.vector.management" xreflabel="Space Overhead Management">
<title>Space Overhead Management</title> <title>Space Overhead Management</title>
<para> <para>
In <ulink In <ulink
...@@ -103,15 +103,15 @@ ...@@ -103,15 +103,15 @@
url="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</ulink>. url="http://gcc.gnu.org/ml/libstdc++/2002-07/msg00111.html">here</ulink>.
</para> </para>
</sect2></sect1> </sect3></sect2>
</chapter> </sect1>
<!-- Chapter 02 : Associative --> <!-- Sect1 02 : Associative -->
<chapter id="manual.containers.associative" xreflabel="Associative"> <sect1 id="std.containers.associative" xreflabel="Associative">
<?dbhtml filename="associative.html"?> <?dbhtml filename="associative.html"?>
<title>Associative</title> <title>Associative</title>
<sect1 id="containers.associative.insert_hints" xreflabel="Insertion Hints"> <sect2 id="containers.associative.insert_hints" xreflabel="Insertion Hints">
<title>Insertion Hints</title> <title>Insertion Hints</title>
<para> <para>
Section [23.1.2], Table 69, of the C++ standard lists this Section [23.1.2], Table 69, of the C++ standard lists this
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<code>end()</code>, then the item being inserted should have <code>end()</code>, then the item being inserted should have
a key greater than all the other keys in the container. The a key greater than all the other keys in the container. The
item will be inserted at the end of the container, becoming item will be inserted at the end of the container, becoming
the new entry before <code>end()</code>. the new entry before <code>end()</code>.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -216,13 +216,13 @@ ...@@ -216,13 +216,13 @@
point to the correct place, then no further local searching is point to the correct place, then no further local searching is
done; the search begins from scratch in logarithmic time. done; the search begins from scratch in logarithmic time.
</para> </para>
</sect1> </sect2>
<sect1 id="containers.associative.bitset" xreflabel="bitset"> <sect2 id="containers.associative.bitset" xreflabel="bitset">
<?dbhtml filename="bitset.html"?> <?dbhtml filename="bitset.html"?>
<title>bitset</title> <title>bitset</title>
<sect2 id="associative.bitset.size_variable" xreflabel="Variable"> <sect3 id="associative.bitset.size_variable" xreflabel="Variable">
<title>Size Variable</title> <title>Size Variable</title>
<para> <para>
No, you cannot write code of the form No, you cannot write code of the form
...@@ -233,9 +233,9 @@ ...@@ -233,9 +233,9 @@
void foo (size_t n) void foo (size_t n)
{ {
std::bitset&lt;n&gt; bits; std::bitset&lt;n&gt; bits;
.... ....
} }
</programlisting> </programlisting>
<para> <para>
because <code>n</code> must be known at compile time. Your because <code>n</code> must be known at compile time. Your
...@@ -245,12 +245,12 @@ ...@@ -245,12 +245,12 @@
<para> <para>
There are a couple of ways to handle this kind of thing. Please There are a couple of ways to handle this kind of thing. Please
consider all of them before passing judgement. They include, in consider all of them before passing judgement. They include, in
no particular order: no chaptericular order:
</para> </para>
<itemizedlist> <itemizedlist>
<listitem><para>A very large N in <code>bitset&lt;N&gt;</code>.</para></listitem> <listitem><para>A very large N in <code>bitset&lt;N&gt;</code>.</para></listitem>
<listitem><para>A container&lt;bool&gt;.</para></listitem> <listitem><para>A container&lt;bool&gt;.</para></listitem>
<listitem><para>Extremely weird solutions.</para></listitem> <listitem><para>Extremely weird solutions.</para></listitem>
</itemizedlist> </itemizedlist>
<para> <para>
<emphasis>A very large N in <emphasis>A very large N in
...@@ -329,8 +329,8 @@ ...@@ -329,8 +329,8 @@
<link linkend="manual.ext.containers.sgi">some extensions</link>. <link linkend="manual.ext.containers.sgi">some extensions</link>.
</para> </para>
</sect2> </sect3>
<sect2 id="associative.bitset.type_string" xreflabel="Type String"> <sect3 id="associative.bitset.type_string" xreflabel="Type String">
<title>Type String</title> <title>Type String</title>
<para> <para>
</para> </para>
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
<programlisting> <programlisting>
std::bitset&lt;5&gt; b ( std::string(<quote>10110</quote>) ); std::bitset&lt;5&gt; b ( std::string(<quote>10110</quote>) );
</programlisting> </programlisting>
<para> <para>
instead of instead of
</para> </para>
...@@ -357,17 +357,17 @@ ...@@ -357,17 +357,17 @@
<programlisting> <programlisting>
std::bitset&lt;5&gt; b ( <quote>10110</quote> ); // invalid std::bitset&lt;5&gt; b ( <quote>10110</quote> ); // invalid
</programlisting> </programlisting>
</sect2> </sect3>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 03 : Interacting with C --> <!-- Sect1 03 : Interacting with C -->
<chapter id="manual.containers.c" xreflabel="Interacting with C"> <sect1 id="std.containers.c" xreflabel="Interacting with C">
<?dbhtml filename="containers_and_c.html"?> <?dbhtml filename="containers_and_c.html"?>
<title>Interacting with C</title> <title>Interacting with C</title>
<sect1 id="containers.c.vs_array" xreflabel="Containers vs. Arrays"> <sect2 id="containers.c.vs_array" xreflabel="Containers vs. Arrays">
<title>Containers vs. Arrays</title> <title>Containers vs. Arrays</title>
<para> <para>
You're writing some code and can't decide whether to use builtin You're writing some code and can't decide whether to use builtin
...@@ -422,27 +422,27 @@ template&lt;typename T&gt; ...@@ -422,27 +422,27 @@ template&lt;typename T&gt;
{ return v.begin(); } { return v.begin(); }
template&lt;typename T, unsigned int sz&gt; template&lt;typename T, unsigned int sz&gt;
inline T* inline T*
beginof(T (&amp;array)[sz]) { return array; } beginof(T (&amp;array)[sz]) { return array; }
// endof // endof
template&lt;typename T&gt; template&lt;typename T&gt;
inline typename vector&lt;T&gt;::iterator inline typename vector&lt;T&gt;::iterator
endof(vector&lt;T&gt; &amp;v) endof(vector&lt;T&gt; &amp;v)
{ return v.end(); } { return v.end(); }
template&lt;typename T, unsigned int sz&gt; template&lt;typename T, unsigned int sz&gt;
inline T* inline T*
endof(T (&amp;array)[sz]) { return array + sz; } endof(T (&amp;array)[sz]) { return array + sz; }
// lengthof // lengthof
template&lt;typename T&gt; template&lt;typename T&gt;
inline typename vector&lt;T&gt;::size_type inline typename vector&lt;T&gt;::size_type
lengthof(vector&lt;T&gt; &amp;v) lengthof(vector&lt;T&gt; &amp;v)
{ return v.size(); } { return v.size(); }
template&lt;typename T, unsigned int sz&gt; template&lt;typename T, unsigned int sz&gt;
inline unsigned int inline unsigned int
lengthof(T (&amp;)[sz]) { return sz; } lengthof(T (&amp;)[sz]) { return sz; }
</programlisting> </programlisting>
...@@ -459,13 +459,13 @@ template&lt;typename T, unsigned int sz&gt; ...@@ -459,13 +459,13 @@ template&lt;typename T, unsigned int sz&gt;
Second, the line Second, the line
</para> </para>
<programlisting> <programlisting>
inline unsigned int lengthof (T (&amp;)[sz]) { return sz; } inline unsigned int lengthof (T (&amp;)[sz]) { return sz; }
</programlisting> </programlisting>
<para> <para>
looks just weird! Hint: unused parameters can be left nameless. looks just weird! Hint: unused parameters can be left nameless.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
</part> </chapter>
<sect1 id="manual.localization.facet.ctype" xreflabel="ctype"> <section id="std.localization.facet.ctype" xreflabel="ctype">
<?dbhtml filename="ctype.html"?> <?dbhtml filename="ctype.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
ctype ctype
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>ctype</title> <title>ctype</title>
<sect2 id="facet.ctype.impl"> <section id="facet.ctype.impl">
<title>Implementation</title> <title>Implementation</title>
<sect3> <section>
<title>Specializations</title> <title>Specializations</title>
<para> <para>
...@@ -57,10 +57,10 @@ Neither of these two required specializations deals with Unicode ...@@ -57,10 +57,10 @@ Neither of these two required specializations deals with Unicode
characters. characters.
</para> </para>
</sect3> </section>
</sect2> </section>
<sect2 id="facet.ctype.future"> <section id="facet.ctype.future">
<title>Future</title> <title>Future</title>
...@@ -114,7 +114,7 @@ characters. ...@@ -114,7 +114,7 @@ characters.
</itemizedlist> </itemizedlist>
</sect2> </section>
<bibliography id="facet.ctype.biblio"> <bibliography id="facet.ctype.biblio">
...@@ -236,4 +236,4 @@ characters. ...@@ -236,4 +236,4 @@ characters.
</bibliography> </bibliography>
</sect1> </section>
<sect1 id="manual.intro.using.debug" xreflabel="Debugging Support"> <sect1 id="manual.intro.using.debug" xreflabel="Debugging Support">
<?dbhtml filename="debug.html"?> <?dbhtml filename="debug.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
<sect2 id="debug.compiler"> <sect2 id="debug.compiler">
<title>Using <command>g++</command></title> <title>Using <command>g++</command></title>
<para> <para>
Compiler flags determine how debug information is transmitted Compiler flags determine how debug information is transmitted
between compilation and debug or analysis tools. between compilation and debug or analysis tools.
</para> </para>
<para> <para>
The default optimizations and debug flags for a libstdc++ build The default optimizations and debug flags for a libstdc++ build
are <code>-g -O2</code>. However, both debug and optimization are <code>-g -O2</code>. However, both debug and optimization
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</para> </para>
<para> <para>
A second approach is to use the configuration flags A second approach is to use the configuration flags
</para> </para>
<programlisting> <programlisting>
make CXXFLAGS='-g3 -fno-inline -O0' all make CXXFLAGS='-g3 -fno-inline -O0' all
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
debugging tasks, when you cannot or don't want to recompile your debugging tasks, when you cannot or don't want to recompile your
application to use the <link linkend="manual.ext.debug_mode">debug mode</link>.</para> application to use the <link linkend="manual.ext.debug_mode">debug mode</link>.</para>
</sect2> </sect2>
<sect2 id="debug.memory"> <sect2 id="debug.memory">
<title>Memory Leak Hunting</title> <title>Memory Leak Hunting</title>
...@@ -174,8 +174,8 @@ ...@@ -174,8 +174,8 @@
int main() int main()
{ {
extern void* __dso_handle __attribute__ ((__weak__)); extern void* __dso_handle __attribute__ ((__weak__));
__cxa_atexit((void (*) (void *)) __libc_freeres, NULL, __cxa_atexit((void (*) (void *)) __libc_freeres, NULL,
&amp;__dso_handle ? __dso_handle : NULL); &amp;__dso_handle ? __dso_handle : NULL);
do_test(); do_test();
return 0; return 0;
} }
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
Suggested valgrind flags, given the suggestions above about setting Suggested valgrind flags, given the suggestions above about setting
up the runtime environment, library, and test file, might be: up the runtime environment, library, and test file, might be:
</para> </para>
<programlisting> <programlisting>
valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out valgrind -v --num-callers=20 --leak-check=yes --leak-resolution=high --show-reachable=yes a.out
</programlisting> </programlisting>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
<sect2 id="debug.gdb"> <sect2 id="debug.gdb">
<title>Using <command>gdb</command></title> <title>Using <command>gdb</command></title>
<para> <para>
</para> </para>
<para> <para>
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</para> </para>
<programlisting> <programlisting>
svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python svn co svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
</programlisting> </programlisting>
<para> <para>
...@@ -295,8 +295,8 @@ ...@@ -295,8 +295,8 @@
<sect2 id="debug.profile_mode" xreflabel="debug.profile_mode"> <sect2 id="debug.profile_mode" xreflabel="debug.profile_mode">
<title>Profile-based Performance Analysis</title> <title>Profile-based Performance Analysis</title>
<para> The <link linkend="manual.ext.profile_mode">Profile-based <para> The <link linkend="manual.ext.profile_mode">Profile-based
Performance Analysis</link> Extension has performance checks for many Performance Analysis</link> Extension has performance checks for many
algorithms. algorithms.
</para> </para>
</sect2> </sect2>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<chapter id="manual.ext.debug_mode" xreflabel="Debug Mode"> <chapter id="manual.ext.debug_mode" xreflabel="Debug Mode">
<?dbhtml filename="debug_mode.html"?> <?dbhtml filename="debug_mode.html"?>
<chapterinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
library facilities, and will report errors in the use of libstdc++ library facilities, and will report errors in the use of libstdc++
as soon as they can be detected by emitting a description of the as soon as they can be detected by emitting a description of the
problem to standard error and aborting the program. This debug problem to standard error and aborting the program. This debug
mode is available with GCC 3.4.0 and later versions. mode is available with GCC 3.4.0 and later versions.
</para> </para>
<para> <para>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
incrementing a past-the-end iterator or dereferencing an iterator incrementing a past-the-end iterator or dereferencing an iterator
that points to a container that has been destructed are diagnosed that points to a container that has been destructed are diagnosed
immediately.</para></listitem> immediately.</para></listitem>
<listitem><para><emphasis>Algorithm preconditions</emphasis>: Algorithms attempt to <listitem><para><emphasis>Algorithm preconditions</emphasis>: Algorithms attempt to
validate their input parameters to detect errors as early as validate their input parameters to detect errors as early as
possible. For instance, the <code>set_intersection</code> possible. For instance, the <code>set_intersection</code>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
instance, erasing an element in a <code>std::list</code> is a instance, erasing an element in a <code>std::list</code> is a
constant-time operation in normal library, but in debug mode it is constant-time operation in normal library, but in debug mode it is
linear in the number of iterators that reference that particular linear in the number of iterators that reference that particular
list. So while your (correct) program won't change its results, it list. So while your (correct) program won't change its results, it
is likely to execute more slowly.</para> is likely to execute more slowly.</para>
<para>libstdc++ includes many extensions to the C++ standard library. In <para>libstdc++ includes many extensions to the C++ standard library. In
...@@ -375,7 +375,7 @@ containers have additional debug capability. ...@@ -375,7 +375,7 @@ containers have additional debug capability.
own usability and implementation characteristics. In general, the own usability and implementation characteristics. In general, the
higher-numbered conformance levels are more usable (i.e., require higher-numbered conformance levels are more usable (i.e., require
less recompilation) but are more complicated to implement than less recompilation) but are more complicated to implement than
the lower-numbered conformance levels. the lower-numbered conformance levels.
<orderedlist> <orderedlist>
<listitem><para><emphasis>Full recompilation</emphasis>: The user must recompile his or <listitem><para><emphasis>Full recompilation</emphasis>: The user must recompile his or
her entire application and all C++ libraries it depends on, her entire application and all C++ libraries it depends on,
...@@ -486,7 +486,7 @@ containers have additional debug capability. ...@@ -486,7 +486,7 @@ containers have additional debug capability.
<listitem><para><code>Iterator</code>: The underlying iterator type, which must <listitem><para><code>Iterator</code>: The underlying iterator type, which must
be either the <code>iterator</code> or <code>const_iterator</code> be either the <code>iterator</code> or <code>const_iterator</code>
typedef from the sequence type this iterator can reference.</para></listitem> typedef from the sequence type this iterator can reference.</para></listitem>
<listitem><para><code>Sequence</code>: The type of sequence that this iterator <listitem><para><code>Sequence</code>: The type of sequence that this iterator
references. This sequence must be a safe sequence (discussed below) references. This sequence must be a safe sequence (discussed below)
whose <code>iterator</code> or <code>const_iterator</code> typedef whose <code>iterator</code> or <code>const_iterator</code> typedef
...@@ -511,7 +511,7 @@ containers have additional debug capability. ...@@ -511,7 +511,7 @@ containers have additional debug capability.
instantiated with the type of the safe container itself (an instance instantiated with the type of the safe container itself (an instance
of the curiously recurring template pattern).</para> of the curiously recurring template pattern).</para>
<para>The iterators of a container wrapper will be <para>The iterators of a container wrapper will be
<link linkend="debug_mode.design.methods.safe_iter">safe <link linkend="debug_mode.design.methods.safe_iter">safe
iterators</link> that reference sequences of this type and wrap the iterators</link> that reference sequences of this type and wrap the
iterators provided by the release-mode base class. The debugging iterators provided by the release-mode base class. The debugging
...@@ -627,7 +627,7 @@ namespace std ...@@ -627,7 +627,7 @@ namespace std
}; };
} // namespace std } // namespace std
</programlisting> </programlisting>
<para>In debug mode we include the release-mode container (which is now <para>In debug mode we include the release-mode container (which is now
defined in the namespace <code>__norm</code>) and also the defined in the namespace <code>__norm</code>) and also the
debug-mode container. The debug-mode container is defined within the debug-mode container. The debug-mode container is defined within the
...@@ -646,7 +646,7 @@ namespace std ...@@ -646,7 +646,7 @@ namespace std
template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt; template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
class list class list
{ {
// ... // ...
}; };
} // namespace __gnu_norm } // namespace __gnu_norm
...@@ -655,9 +655,9 @@ namespace std ...@@ -655,9 +655,9 @@ namespace std
template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt; template&lt;typename _Tp, typename _Alloc = allocator&lt;_Tp&gt; &gt;
class list class list
: public __norm::list&lt;_Tp, _Alloc&gt;, : public __norm::list&lt;_Tp, _Alloc&gt;,
public __gnu_debug::_Safe_sequence&lt;list&lt;_Tp, _Alloc&gt; &gt; public __gnu_debug::_Safe_sequence&lt;list&lt;_Tp, _Alloc&gt; &gt;
{ {
// ... // ...
}; };
} // namespace __norm } // namespace __norm
...@@ -694,12 +694,12 @@ runtime errors. A simplified example of this problem is as follows. ...@@ -694,12 +694,12 @@ runtime errors. A simplified example of this problem is as follows.
#include &lt;string&gt; #include &lt;string&gt;
std::string test02(); std::string test02();
std::string test01() std::string test01()
{ {
return test02(); return test02();
} }
int main() int main()
{ {
test01(); test01();
...@@ -711,7 +711,7 @@ int main() ...@@ -711,7 +711,7 @@ int main()
<programlisting> <programlisting>
#include &lt;string&gt; #include &lt;string&gt;
std::string std::string
test02() test02()
{ {
...@@ -831,7 +831,7 @@ test02() ...@@ -831,7 +831,7 @@ test02()
include ordering. Two, ODR issues remained with container member include ordering. Two, ODR issues remained with container member
functions taking no arguments in mixed-mode settings resulting in functions taking no arguments in mixed-mode settings resulting in
equivalent link names, <code> vector::push_back() </code> being equivalent link names, <code> vector::push_back() </code> being
one example. one example.
See <ulink url="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00177.html">link See <ulink url="http://gcc.gnu.org/ml/libstdc++/2003-08/msg00177.html">link
name</ulink> </para></listitem> name</ulink> </para></listitem>
</itemizedlist> </itemizedlist>
...@@ -850,7 +850,7 @@ test02() ...@@ -850,7 +850,7 @@ test02()
mode implementations.</para> mode implementations.</para>
</sect4> </sect4>
</sect3> </sect3>
</sect2> </sect2>
<sect2 id="debug_mode.design.other" xreflabel="Other"> <sect2 id="debug_mode.design.other" xreflabel="Other">
<title>Other Implementations</title> <title>Other Implementations</title>
...@@ -885,7 +885,7 @@ test02() ...@@ -885,7 +885,7 @@ test02()
guarantee.</para></listitem> guarantee.</para></listitem>
</itemizedlist> </itemizedlist>
</sect2> </sect2>
</sect1> </sect1>
</chapter> </chapter>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.diagnostics" xreflabel="Diagnostics"> <chapter id="std.diagnostics" xreflabel="Diagnostics">
<?dbhtml filename="diagnostics.html"?> <?dbhtml filename="diagnostics.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Diagnostics Diagnostics
<indexterm><primary>Diagnostics</primary></indexterm> <indexterm><primary>Diagnostics</primary></indexterm>
</title> </title>
<chapter id="manual.diagnostics.exceptions" xreflabel="Exceptions"> <sect1 id="std.diagnostics.exceptions" xreflabel="Exceptions">
<?dbhtml filename="exceptions.html"?> <?dbhtml filename="exceptions.html"?>
<title>Exceptions</title> <title>Exceptions</title>
<sect1 id="manual.diagnostics.exceptions.hierarchy" xreflabel="Exception Classes"> <sect2 id="std.diagnostics.exceptions.hierarchy" xreflabel="Exception Classes">
<title>Exception Classes</title> <title>Exception Classes</title>
<para> <para>
All exception objects are defined in one of the standard header All exception objects are defined in one of the standard header
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
found in the <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00460.html">source documentation</ulink>. found in the <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00460.html">source documentation</ulink>.
</para> </para>
</sect1> </sect2>
<sect1 id="manual.diagnostics.exceptions.data" xreflabel="Adding Data to Exceptions"> <sect2 id="std.diagnostics.exceptions.data" xreflabel="Adding Data to Exceptions">
<title>Adding Data to Exceptions</title> <title>Adding Data to Exceptions</title>
<para> <para>
The standard exception classes carry with them a single string as The standard exception classes carry with them a single string as
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
{ {
public: public:
My_Exception (const string&amp; whatarg) My_Exception (const string&amp; whatarg)
: std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { } : std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { }
int errno_at_time_of_throw() const { return e; } int errno_at_time_of_throw() const { return e; }
DBID id_of_thing_that_threw() const { return id; } DBID id_of_thing_that_threw() const { return id; }
protected: protected:
...@@ -70,10 +70,10 @@ ...@@ -70,10 +70,10 @@
}; };
</programlisting> </programlisting>
</sect1> </sect2>
</chapter> </sect1>
<chapter id="manual.diagnostics.concept_checking" xreflabel="Concept Checking"> <sect1 id="std.diagnostics.concept_checking" xreflabel="Concept Checking">
<title>Concept Checking</title> <title>Concept Checking</title>
<para> <para>
In 1999, SGI added <quote>concept checkers</quote> to their In 1999, SGI added <quote>concept checkers</quote> to their
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
You can enable them on a per-translation-unit basis with You can enable them on a per-translation-unit basis with
<literal>-D_GLIBCXX_CONCEPT_CHECKS</literal>. <literal>-D_GLIBCXX_CONCEPT_CHECKS</literal>.
</para> </para>
<para> <para>
Please note that the upcoming C++ standard has first-class Please note that the upcoming C++ standard has first-class
support for template parameter constraints based on concepts in the core support for template parameter constraints based on concepts in the core
...@@ -120,6 +120,6 @@ ...@@ -120,6 +120,6 @@
checking described above. checking described above.
</para> </para>
</chapter> </sect1>
</part> </chapter>
<sect1 id="appendix.porting.api" xreflabel="api"> <sect1 id="appendix.porting.api" xreflabel="api">
<?dbhtml filename="api.html"?> <?dbhtml filename="api.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword>ISO C++</keyword> <keyword>ISO C++</keyword>
...@@ -80,10 +80,10 @@ Removal of <filename class="headerfile">ext/tree</filename>, moved to <filename ...@@ -80,10 +80,10 @@ Removal of <filename class="headerfile">ext/tree</filename>, moved to <filename
<para> For GCC releases from 2.95 through the 3.1 series, defining <para> For GCC releases from 2.95 through the 3.1 series, defining
<literal>__USE_MALLOC</literal> on the gcc command line would change the <literal>__USE_MALLOC</literal> on the gcc command line would change the
default allocation strategy to instead use <code> malloc</code> and default allocation strategy to instead use <code> malloc</code> and
<function>free</function>. (This same functionality is now spelled <literal>_GLIBCXX_FORCE_NEW</literal>, see <function>free</function>. (This same functionality is now spelled <literal>_GLIBCXX_FORCE_NEW</literal>, see
<link linkend="manual.intro.using.macros">this page</link> <link linkend="manual.intro.using.macros">this page</link>
for details. for details.
</para> </para>
<para>Error handling in iostreams cleaned up, made consistent. </para> <para>Error handling in iostreams cleaned up, made consistent. </para>
...@@ -431,7 +431,7 @@ Parallel mode first appears. ...@@ -431,7 +431,7 @@ Parallel mode first appears.
</para> </para>
<para>Variadic template implementations of items in <filename class="headerfile">tuple</filename> and <para>Variadic template implementations of items in <filename class="headerfile">tuple</filename> and
<filename class="headerfile">functional</filename>. <filename class="headerfile">functional</filename>.
</para> </para>
<para>Default <code>what</code> implementations give more elaborate <para>Default <code>what</code> implementations give more elaborate
...@@ -441,7 +441,7 @@ Parallel mode first appears. ...@@ -441,7 +441,7 @@ Parallel mode first appears.
</para> </para>
<para> <para>
PCH binary files no longer installed. Instead, the source files are installed. PCH binary files no longer installed. Instead, the source files are installed.
</para> </para>
<para> <para>
...@@ -604,7 +604,7 @@ Profile mode first appears. ...@@ -604,7 +604,7 @@ Profile mode first appears.
</para> </para>
<para> <para>
Support for decimal floating-point arithmetic, including <classname>decimal32</classname>, <classname>decimal64</classname>, and <classname>decimal128</classname>. Support for decimal floating-point arithmetic, including <classname>decimal32</classname>, <classname>decimal64</classname>, and <classname>decimal128</classname>.
</para> </para>
<para> <para>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.ext" xreflabel="Extensions"> <part id="manual.ext" xreflabel="Extensions">
<?dbhtml filename="extensions.html"?> <?dbhtml filename="extensions.html"?>
<partinfo> <partinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -35,7 +35,7 @@ extensions, be aware of two things: ...@@ -35,7 +35,7 @@ extensions, be aware of two things:
<orderedlist> <orderedlist>
<listitem> <listitem>
<para> <para>
Non-Standard means exactly that. Non-Standard means exactly that.
</para> </para>
<para> <para>
The behavior, and the very The behavior, and the very
...@@ -43,12 +43,12 @@ extensions, be aware of two things: ...@@ -43,12 +43,12 @@ extensions, be aware of two things:
warning. (Ideally, the really good ones will appear in the next warning. (Ideally, the really good ones will appear in the next
revision of C++.) Also, other platforms, other compilers, other revision of C++.) Also, other platforms, other compilers, other
versions of g++ or libstdc++ may not recognize these names, or versions of g++ or libstdc++ may not recognize these names, or
treat them differently, or... treat them differently, or...
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
You should know how to access these headers properly. You should know how to access these headers properly.
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
...@@ -104,17 +104,17 @@ extensions, be aware of two things: ...@@ -104,17 +104,17 @@ extensions, be aware of two things:
</chapter> </chapter>
<!-- Chapter 02 : Debug Mode --> <!-- Chapter 02 : Debug Mode -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="debug_mode.xml"> parse="xml" href="debug_mode.xml">
</xi:include> </xi:include>
<!-- Chapter 03 : Parallel Mode --> <!-- Chapter 03 : Parallel Mode -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="parallel_mode.xml"> parse="xml" href="parallel_mode.xml">
</xi:include> </xi:include>
<!-- Chapter 04 : Profile Mode --> <!-- Chapter 04 : Profile Mode -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="profile_mode.xml"> parse="xml" href="profile_mode.xml">
</xi:include> </xi:include>
...@@ -125,12 +125,12 @@ extensions, be aware of two things: ...@@ -125,12 +125,12 @@ extensions, be aware of two things:
<title>Allocators</title> <title>Allocators</title>
<!-- Section 01 : __mt_alloc --> <!-- Section 01 : __mt_alloc -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="mt_allocator.xml"> parse="xml" href="mt_allocator.xml">
</xi:include> </xi:include>
<!-- Section 02 : bitmap_allocator --> <!-- Section 02 : bitmap_allocator -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="bitmap_allocator.xml"> parse="xml" href="bitmap_allocator.xml">
</xi:include> </xi:include>
...@@ -186,7 +186,7 @@ extensions, be aware of two things: ...@@ -186,7 +186,7 @@ extensions, be aware of two things:
no present plans to do so (and there doesn't seem to be any immediate no present plans to do so (and there doesn't seem to be any immediate
reason to). reason to).
</para> </para>
<para>The semantics of member function <code>operator[]</code> are not specified <para>The semantics of member function <code>operator[]</code> are not specified
in the C++ standard. A long-standing defect report calls for sensible in the C++ standard. A long-standing defect report calls for sensible
obvious semantics, which are already implemented here: <code>op[]</code> obvious semantics, which are already implemented here: <code>op[]</code>
on a const bitset returns a bool, and for a non-const bitset returns a on a const bitset returns a bool, and for a non-const bitset returns a
...@@ -269,7 +269,7 @@ extensions, be aware of two things: ...@@ -269,7 +269,7 @@ extensions, be aware of two things:
</para> </para>
</blockquote> </blockquote>
</sect1> </sect1>
</chapter> </chapter>
<!-- Chapter 07 : Utilities --> <!-- Chapter 07 : Utilities -->
...@@ -283,22 +283,22 @@ extensions, be aware of two things: ...@@ -283,22 +283,22 @@ extensions, be aware of two things:
</para> </para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><code>identity_element</code> for addition and multiplication. * <para><code>identity_element</code> for addition and multiplication. *
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>The functor <code>identity</code>, whose <code>operator()</code> <para>The functor <code>identity</code>, whose <code>operator()</code>
returns the argument unchanged. * returns the argument unchanged. *
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>Composition functors <code>unary_function</code> and <para>Composition functors <code>unary_function</code> and
<code>binary_function</code>, and their helpers <code>compose1</code> <code>binary_function</code>, and their helpers <code>compose1</code>
and <code>compose2</code>. * and <code>compose2</code>. *
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para><code>select1st</code> and <code>select2nd</code>, to strip pairs. * <para><code>select1st</code> and <code>select2nd</code>, to strip pairs. *
</para> </para>
</listitem> </listitem>
<listitem><para><code>project1st</code> and <code>project2nd</code>. * </para></listitem> <listitem><para><code>project1st</code> and <code>project2nd</code>. * </para></listitem>
...@@ -368,13 +368,13 @@ get_temporary_buffer(5, (int*)0); ...@@ -368,13 +368,13 @@ get_temporary_buffer(5, (int*)0);
<itemizedlist> <itemizedlist>
<listitem><para><code>is_heap</code> tests whether or not a range is a heap.</para></listitem> <listitem><para><code>is_heap</code> tests whether or not a range is a heap.</para></listitem>
<listitem><para><code>is_sorted</code> tests whether or not a range is sorted in <listitem><para><code>is_sorted</code> tests whether or not a range is sorted in
nondescending order.</para></listitem> nondescending order.</para></listitem>
</itemizedlist> </itemizedlist>
<para>25.3.8 (lexicographical_compare) is extended with <para>25.3.8 (lexicographical_compare) is extended with
</para> </para>
<programlisting> <programlisting>
lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1, lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
_InputIter2 first2, _InputIter2 last2)</programlisting> _InputIter2 first2, _InputIter2 last2)</programlisting>
<para>which does... what? <para>which does... what?
</para> </para>
...@@ -451,41 +451,41 @@ get_temporary_buffer(5, (int*)0); ...@@ -451,41 +451,41 @@ get_temporary_buffer(5, (int*)0);
</para> </para>
<itemizedlist> <itemizedlist>
<listitem><para>3.0.x <code>filebuf</code>s have another ctor with this signature: <listitem><para>3.0.x <code>filebuf</code>s have another ctor with this signature:
<code>basic_filebuf(__c_file_type*, ios_base::openmode, int_type); <code>basic_filebuf(__c_file_type*, ios_base::openmode, int_type);
</code> </code>
This comes in very handy in a number of places, such as This comes in very handy in a number of places, such as
attaching Unix sockets, pipes, and anything else which uses file attaching Unix sockets, pipes, and anything else which uses file
descriptors, into the IOStream buffering classes. The three descriptors, into the IOStream buffering classes. The three
arguments are as follows: arguments are as follows:
<itemizedlist> <itemizedlist>
<listitem><para><code>__c_file_type* F </code> <listitem><para><code>__c_file_type* F </code>
// the __c_file_type typedef usually boils down to stdio's FILE // the __c_file_type typedef usually boils down to stdio's FILE
</para></listitem> </para></listitem>
<listitem><para><code>ios_base::openmode M </code> <listitem><para><code>ios_base::openmode M </code>
// same as all the other uses of openmode // same as all the other uses of openmode
</para></listitem> </para></listitem>
<listitem><para><code>int_type B </code> <listitem><para><code>int_type B </code>
// buffer size, defaults to BUFSIZ if not specified // buffer size, defaults to BUFSIZ if not specified
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
For those wanting to use file descriptors instead of FILE*'s, I For those wanting to use file descriptors instead of FILE*'s, I
invite you to contemplate the mysteries of C's <code>fdopen()</code>. invite you to contemplate the mysteries of C's <code>fdopen()</code>.
</para></listitem> </para></listitem>
<listitem><para>In library snapshot 3.0.95 and later, <code>filebuf</code>s bring <listitem><para>In library snapshot 3.0.95 and later, <code>filebuf</code>s bring
back an old extension: the <code>fd()</code> member function. The back an old extension: the <code>fd()</code> member function. The
integer returned from this function can be used for whatever file integer returned from this function can be used for whatever file
descriptors can be used for on your platform. Naturally, the descriptors can be used for on your platform. Naturally, the
library cannot track what you do on your own with a file descriptor, library cannot track what you do on your own with a file descriptor,
so if you perform any I/O directly, don't expect the library to be so if you perform any I/O directly, don't expect the library to be
aware of it. aware of it.
</para></listitem> </para></listitem>
<listitem><para>Beginning with 3.1, the extra <code>filebuf</code> constructor and <listitem><para>Beginning with 3.1, the extra <code>filebuf</code> constructor and
the <code>fd()</code> function were removed from the standard the <code>fd()</code> function were removed from the standard
filebuf. Instead, <code>&lt;ext/stdio_filebuf.h&gt;</code> contains filebuf. Instead, <code>&lt;ext/stdio_filebuf.h&gt;</code> contains
a derived class called a derived class called
<ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00074.html"><code>__gnu_cxx::stdio_filebuf</code></ulink>. <ulink url="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00074.html"><code>__gnu_cxx::stdio_filebuf</code></ulink>.
This class can be constructed from a C <code>FILE*</code> or a file This class can be constructed from a C <code>FILE*</code> or a file
descriptor, and provides the <code>fd()</code> function. descriptor, and provides the <code>fd()</code> function.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
<para>If you want to access a <code>filebuf</code>'s file descriptor to <para>If you want to access a <code>filebuf</code>'s file descriptor to
...@@ -572,7 +572,7 @@ int main() ...@@ -572,7 +572,7 @@ int main()
<screen> <screen>
<computeroutput> <computeroutput>
St13bad_exception =&gt; std::bad_exception : 0 St13bad_exception =&gt; std::bad_exception : 0
3barI5emptyLi17EE =&gt; bar&lt;empty, 17&gt; : 0 3barI5emptyLi17EE =&gt; bar&lt;empty, 17&gt; : 0
</computeroutput> </computeroutput>
</screen> </screen>
...@@ -586,7 +586,7 @@ int main() ...@@ -586,7 +586,7 @@ int main()
</chapter> </chapter>
<!-- Chapter 13 : Concurrency --> <!-- Chapter 13 : Concurrency -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="concurrency_extensions.xml"> parse="xml" href="concurrency_extensions.xml">
</xi:include> </xi:include>
......
<sect1 id="appendix.porting.internals" xreflabel="Portin Internals"> <sect1 id="appendix.porting.internals" xreflabel="Portin Internals">
<?dbhtml filename="internals.html"?> <?dbhtml filename="internals.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -73,7 +73,7 @@ OS portion of the triplet (the default), then nothing needs to be changed. ...@@ -73,7 +73,7 @@ OS portion of the triplet (the default), then nothing needs to be changed.
<para>The first file to create in this directory, should be called <para>The first file to create in this directory, should be called
<code>os_defines.h</code>. This file contains basic macro definitions <code>os_defines.h</code>. This file contains basic macro definitions
that are required to allow the C++ library to work with your C library. that are required to allow the C++ library to work with your C library.
</para> </para>
<para>Several libstdc++ source files unconditionally define the macro <para>Several libstdc++ source files unconditionally define the macro
...@@ -140,7 +140,7 @@ it must be 0 while bootstrapping the compiler/rebuilding the library. ...@@ -140,7 +140,7 @@ it must be 0 while bootstrapping the compiler/rebuilding the library.
this: this:
</para> </para>
<programlisting> <programlisting>
#ifndef _GLIBCXX_OS_DEFINES #ifndef _GLIBCXX_OS_DEFINES
#define _GLIBCXX_OS_DEFINES #define _GLIBCXX_OS_DEFINES
...@@ -207,7 +207,7 @@ masks. You will have to peer at your own <code>&lt;ctype.h&gt;</code> to figure ...@@ -207,7 +207,7 @@ masks. You will have to peer at your own <code>&lt;ctype.h&gt;</code> to figure
how to define the values required by this file. how to define the values required by this file.
</para> </para>
<para>The <code>ctype_base.h</code> header file does not need include guards. <para>The <code>ctype_base.h</code> header file does not need include guards.
It should contain a single <code>struct</code> definition called It should contain a single <code>struct</code> definition called
<code>ctype_base</code>. This <code>struct</code> should contain two type <code>ctype_base</code>. This <code>struct</code> should contain two type
declarations, and one enumeration declaration, like this example, taken declarations, and one enumeration declaration, like this example, taken
...@@ -219,20 +219,20 @@ from the IRIX configuration: ...@@ -219,20 +219,20 @@ from the IRIX configuration:
{ {
typedef unsigned int mask; typedef unsigned int mask;
typedef int* __to_type; typedef int* __to_type;
enum enum
{ {
space = _ISspace, space = _ISspace,
print = _ISprint, print = _ISprint,
cntrl = _IScntrl, cntrl = _IScntrl,
upper = _ISupper, upper = _ISupper,
lower = _ISlower, lower = _ISlower,
alpha = _ISalpha, alpha = _ISalpha,
digit = _ISdigit, digit = _ISdigit,
punct = _ISpunct, punct = _ISpunct,
xdigit = _ISxdigit, xdigit = _ISxdigit,
alnum = _ISalnum, alnum = _ISalnum,
graph = _ISgraph graph = _ISgraph
}; };
}; };
</programlisting> </programlisting>
...@@ -262,14 +262,14 @@ constructor. Here is the IRIX example: ...@@ -262,14 +262,14 @@ constructor. Here is the IRIX example:
<programlisting> <programlisting>
ctype&lt;char&gt;::ctype(const mask* __table = 0, bool __del = false, ctype&lt;char&gt;::ctype(const mask* __table = 0, bool __del = false,
size_t __refs = 0) size_t __refs = 0)
: _Ctype_nois&lt;char&gt;(__refs), _M_del(__table != 0 &amp;&amp; __del), : _Ctype_nois&lt;char&gt;(__refs), _M_del(__table != 0 &amp;&amp; __del),
_M_toupper(NULL), _M_toupper(NULL),
_M_tolower(NULL), _M_tolower(NULL),
_M_ctable(NULL), _M_ctable(NULL),
_M_table(!__table _M_table(!__table
? (const mask*) (__libc_attr._ctype_tbl-&gt;_class + 1) ? (const mask*) (__libc_attr._ctype_tbl-&gt;_class + 1)
: __table) : __table)
{ } { }
</programlisting> </programlisting>
...@@ -291,7 +291,7 @@ lower-case, and vice versa. Here are the IRIX versions: ...@@ -291,7 +291,7 @@ lower-case, and vice versa. Here are the IRIX versions:
char char
ctype&lt;char&gt;::do_toupper(char __c) const ctype&lt;char&gt;::do_toupper(char __c) const
{ return _toupper(__c); } { return _toupper(__c); }
char char
ctype&lt;char&gt;::do_tolower(char __c) const ctype&lt;char&gt;::do_tolower(char __c) const
{ return _tolower(__c); } { return _tolower(__c); }
...@@ -313,21 +313,21 @@ machinery to do that on your system: ...@@ -313,21 +313,21 @@ machinery to do that on your system:
ctype&lt;char&gt;::do_toupper(char* __low, const char* __high) const ctype&lt;char&gt;::do_toupper(char* __low, const char* __high) const
{ {
while (__low &lt; __high) while (__low &lt; __high)
{ {
*__low = do_toupper(*__low); *__low = do_toupper(*__low);
++__low; ++__low;
} }
return __high; return __high;
} }
const char* const char*
ctype&lt;char&gt;::do_tolower(char* __low, const char* __high) const ctype&lt;char&gt;::do_tolower(char* __low, const char* __high) const
{ {
while (__low &lt; __high) while (__low &lt; __high)
{ {
*__low = do_tolower(*__low); *__low = do_tolower(*__low);
++__low; ++__low;
} }
return __high; return __high;
} }
</programlisting> </programlisting>
...@@ -352,7 +352,7 @@ properties; they are analogous to the functions like <code>isalpha</code> and ...@@ -352,7 +352,7 @@ properties; they are analogous to the functions like <code>isalpha</code> and
{ return (_M_table)[(unsigned char)(__c)] &amp; __m; } { return (_M_table)[(unsigned char)(__c)] &amp; __m; }
</programlisting> </programlisting>
<para>The <code>_M_table</code> is the table passed in above, in the constructor. <para>The <code>_M_table</code> is the table passed in above, in the constructor.
This is the table that contains the bitmasks for each character. The This is the table that contains the bitmasks for each character. The
implementation here should work on all systems. implementation here should work on all systems.
</para> </para>
...@@ -366,7 +366,7 @@ implementation here should work on all systems. ...@@ -366,7 +366,7 @@ implementation here should work on all systems.
is(const char* __low, const char* __high, mask* __vec) const throw() is(const char* __low, const char* __high, mask* __vec) const throw()
{ {
while (__low &lt; __high) while (__low &lt; __high)
*__vec++ = (_M_table)[(unsigned char)(*__low++)]; *__vec++ = (_M_table)[(unsigned char)(*__low++)];
return __high; return __high;
} }
</programlisting> </programlisting>
...@@ -385,16 +385,16 @@ from <code>__low</code> up until <code>__high</code> into the vector given by ...@@ -385,16 +385,16 @@ from <code>__low</code> up until <code>__high</code> into the vector given by
scan_is(mask __m, const char* __low, const char* __high) const throw() scan_is(mask __m, const char* __low, const char* __high) const throw()
{ {
while (__low &lt; __high &amp;&amp; !this-&gt;is(__m, *__low)) while (__low &lt; __high &amp;&amp; !this-&gt;is(__m, *__low))
++__low; ++__low;
return __low; return __low;
} }
const char* const char*
ctype&lt;char&gt;:: ctype&lt;char&gt;::
scan_not(mask __m, const char* __low, const char* __high) const throw() scan_not(mask __m, const char* __low, const char* __high) const throw()
{ {
while (__low &lt; __high &amp;&amp; this-&gt;is(__m, *__low)) while (__low &lt; __high &amp;&amp; this-&gt;is(__m, *__low))
++__low; ++__low;
return __low; return __low;
} }
</programlisting> </programlisting>
...@@ -454,7 +454,7 @@ type, and two functions. ...@@ -454,7 +454,7 @@ type, and two functions.
typedef long _Atomic_word; typedef long _Atomic_word;
</programlisting> </programlisting>
<para>This type must be a signed integral type supporting atomic operations. <para>This type must be a signed integral type supporting atomic operations.
If you're using the OS approach, use the same type used by your system's If you're using the OS approach, use the same type used by your system's
primitives. Otherwise, use the type for which your CPU provides atomic primitives. Otherwise, use the type for which your CPU provides atomic
primitives. primitives.
...@@ -473,7 +473,7 @@ must be equivalent to those provided here, but using atomic operations: ...@@ -473,7 +473,7 @@ must be equivalent to those provided here, but using atomic operations:
*__mem += __val; *__mem += __val;
return __result; return __result;
} }
static inline void static inline void
__attribute__ ((__unused__)) __attribute__ ((__unused__))
__atomic_add (_Atomic_word* __mem, int __val) __atomic_add (_Atomic_word* __mem, int __val)
...@@ -489,17 +489,17 @@ must be equivalent to those provided here, but using atomic operations: ...@@ -489,17 +489,17 @@ must be equivalent to those provided here, but using atomic operations:
<title>Numeric Limits</title> <title>Numeric Limits</title>
<para>The C++ library requires information about the fundamental data types, <para>The C++ library requires information about the fundamental data types,
such as the minimum and maximum representable values of each type. such as the minimum and maximum representable values of each type.
You can define each of these values individually, but it is usually You can define each of these values individually, but it is usually
easiest just to indicate how many bits are used in each of the data easiest just to indicate how many bits are used in each of the data
types and let the library do the rest. For information about the types and let the library do the rest. For information about the
macros to define, see the top of <code>include/bits/std_limits.h</code>. macros to define, see the top of <code>include/bits/std_limits.h</code>.
</para> </para>
<para>If you need to define any macros, you can do so in <code>os_defines.h</code>. <para>If you need to define any macros, you can do so in <code>os_defines.h</code>.
However, if all operating systems for your CPU are likely to use the However, if all operating systems for your CPU are likely to use the
same values, you can provide a CPU-specific file instead so that you same values, you can provide a CPU-specific file instead so that you
do not have to provide the same definitions for each operating system. do not have to provide the same definitions for each operating system.
To take that approach, create a new file called <code>cpu_limits.h</code> in To take that approach, create a new file called <code>cpu_limits.h</code> in
your CPU configuration directory (see <link linkend="internals.cpu">CPU</link>). your CPU configuration directory (see <link linkend="internals.cpu">CPU</link>).
</para> </para>
...@@ -510,7 +510,7 @@ your CPU configuration directory (see <link linkend="internals.cpu">CPU</link>). ...@@ -510,7 +510,7 @@ your CPU configuration directory (see <link linkend="internals.cpu">CPU</link>).
<sect2 id="internals.libtool"> <sect2 id="internals.libtool">
<title>Libtool</title> <title>Libtool</title>
<para>The C++ library is compiled, archived and linked with libtool. <para>The C++ library is compiled, archived and linked with libtool.
Explaining the full workings of libtool is beyond the scope of this Explaining the full workings of libtool is beyond the scope of this
document, but there are a few, particular bits that are necessary for document, but there are a few, particular bits that are necessary for
porting. porting.
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.intro" xreflabel="Introduction"> <part id="manual.intro" xreflabel="Introduction">
<?dbhtml filename="intro.html"?> <?dbhtml filename="intro.html"?>
<partinfo> <partinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -31,22 +31,22 @@ ...@@ -31,22 +31,22 @@
<title>Implementation Status</title> <title>Implementation Status</title>
<!-- Section 01.1 : Status C++ 1998 --> <!-- Section 01.1 : Status C++ 1998 -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="status_cxx1998.xml"> parse="xml" href="status_cxx1998.xml">
</xi:include> </xi:include>
<!-- Section 01.2 : Status C++ 200x --> <!-- Section 01.2 : Status C++ 200x -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="status_cxx200x.xml"> parse="xml" href="status_cxx200x.xml">
</xi:include> </xi:include>
<!-- Section 01.3 : Status C++ TR1 --> <!-- Section 01.3 : Status C++ TR1 -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="status_cxxtr1.xml"> parse="xml" href="status_cxxtr1.xml">
</xi:include> </xi:include>
<!-- Section 01.4 : Status C++ TR24733 --> <!-- Section 01.4 : Status C++ TR24733 -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="status_cxxtr24733.xml"> parse="xml" href="status_cxxtr24733.xml">
</xi:include> </xi:include>
</sect1> </sect1>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<title>License</title> <title>License</title>
<para> <para>
There are two licenses affecting GNU libstdc++: one for the code, There are two licenses affecting GNU libstdc++: one for the code,
and one for the documentation. and one for the documentation.
</para> </para>
<para> <para>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<sect2 id="manual.intro.status.license.gpl" xreflabel="License GPL"> <sect2 id="manual.intro.status.license.gpl" xreflabel="License GPL">
<title>The Code: GPL</title> <title>The Code: GPL</title>
<para> <para>
The source code is distributed under the <link The source code is distributed under the <link
linkend="appendix.gpl-3.0">GNU General Public License version 3</link>, linkend="appendix.gpl-3.0">GNU General Public License version 3</link>,
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
the <quote>GCC Runtime Library Exception, version 3.1</quote> the <quote>GCC Runtime Library Exception, version 3.1</quote>
as follows (or see the file COPYING.RUNTIME): as follows (or see the file COPYING.RUNTIME):
</para> </para>
<literallayout> <literallayout>
GCC RUNTIME LIBRARY EXCEPTION GCC RUNTIME LIBRARY EXCEPTION
...@@ -152,7 +152,7 @@ The availability of this Exception does not imply any general ...@@ -152,7 +152,7 @@ The availability of this Exception does not imply any general
presumption that third-party software is unaffected by the copyleft presumption that third-party software is unaffected by the copyleft
requirements of the license of GCC. requirements of the license of GCC.
</literallayout> </literallayout>
<para> <para>
Hopefully that text is self-explanatory. If it isn't, you need to speak Hopefully that text is self-explanatory. If it isn't, you need to speak
to your lawyer, or the Free Software Foundation. to your lawyer, or the Free Software Foundation.
...@@ -161,7 +161,7 @@ requirements of the license of GCC. ...@@ -161,7 +161,7 @@ requirements of the license of GCC.
<sect2 id="manual.intro.status.license.fdl" xreflabel="License FDL"> <sect2 id="manual.intro.status.license.fdl" xreflabel="License FDL">
<title>The Documentation: GPL, FDL</title> <title>The Documentation: GPL, FDL</title>
<para> <para>
The documentation shipped with the library and made available over The documentation shipped with the library and made available over
the web, excluding the pages generated from source comments, are the web, excluding the pages generated from source comments, are
...@@ -170,14 +170,14 @@ requirements of the license of GCC. ...@@ -170,14 +170,14 @@ requirements of the license of GCC.
License version 1.2</link>. There are no Front-Cover Texts, no License version 1.2</link>. There are no Front-Cover Texts, no
Back-Cover Texts, and no Invariant Sections. Back-Cover Texts, and no Invariant Sections.
</para> </para>
<para> <para>
For documentation generated by doxygen or other automated tools For documentation generated by doxygen or other automated tools
via processing source code comments and markup, the original source via processing source code comments and markup, the original source
code license applies to the generated files. Thus, the doxygen code license applies to the generated files. Thus, the doxygen
documents are licensed <link linkend="appendix.gpl-3.0">GPL</link>. documents are licensed <link linkend="appendix.gpl-3.0">GPL</link>.
</para> </para>
<para> <para>
If you plan on making copies of the documentation, please let us know. If you plan on making copies of the documentation, please let us know.
We can probably offer suggestions. We can probably offer suggestions.
...@@ -185,7 +185,7 @@ requirements of the license of GCC. ...@@ -185,7 +185,7 @@ requirements of the license of GCC.
</sect2> </sect2>
</sect1> </sect1>
<!-- Section 03 : Known Bugs --> <!-- Section 03 : Known Bugs -->
<sect1 id="manual.intro.status.bugs" xreflabel="Bugs"> <sect1 id="manual.intro.status.bugs" xreflabel="Bugs">
<?dbhtml filename="bugs.html"?> <?dbhtml filename="bugs.html"?>
...@@ -242,590 +242,590 @@ requirements of the license of GCC. ...@@ -242,590 +242,590 @@ requirements of the license of GCC.
<variablelist> <variablelist>
<varlistentry><term><ulink url="../ext/lwg-defects.html#5">5</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#5">5</ulink>:
<emphasis>string::compare specification questionable</emphasis> <emphasis>string::compare specification questionable</emphasis>
</term> </term>
<listitem><para>This should be two overloaded functions rather than a single function. <listitem><para>This should be two overloaded functions rather than a single function.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#17">17</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#17">17</ulink>:
<emphasis>Bad bool parsing</emphasis> <emphasis>Bad bool parsing</emphasis>
</term> </term>
<listitem><para>Apparently extracting Boolean values was messed up... <listitem><para>Apparently extracting Boolean values was messed up...
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#19">19</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#19">19</ulink>:
<emphasis>&quot;Noconv&quot; definition too vague</emphasis> <emphasis>&quot;Noconv&quot; definition too vague</emphasis>
</term> </term>
<listitem><para>If <code>codecvt::do_in</code> returns <code>noconv</code> there are <listitem><para>If <code>codecvt::do_in</code> returns <code>noconv</code> there are
no changes to the values in <code>[to, to_limit)</code>. no changes to the values in <code>[to, to_limit)</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#22">22</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#22">22</ulink>:
<emphasis>Member open vs flags</emphasis> <emphasis>Member open vs flags</emphasis>
</term> </term>
<listitem><para>Re-opening a file stream does <emphasis>not</emphasis> clear the state flags. <listitem><para>Re-opening a file stream does <emphasis>not</emphasis> clear the state flags.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#23">23</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#23">23</ulink>:
<emphasis>Num_get overflow result</emphasis> <emphasis>Num_get overflow result</emphasis>
</term> </term>
<listitem><para>Implement the proposed resolution. <listitem><para>Implement the proposed resolution.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#25">25</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#25">25</ulink>:
<emphasis>String operator&lt;&lt; uses width() value wrong</emphasis> <emphasis>String operator&lt;&lt; uses width() value wrong</emphasis>
</term> </term>
<listitem><para>Padding issues. <listitem><para>Padding issues.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#48">48</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#48">48</ulink>:
<emphasis>Use of non-existent exception constructor</emphasis> <emphasis>Use of non-existent exception constructor</emphasis>
</term> </term>
<listitem><para>An instance of <code>ios_base::failure</code> is constructed instead. <listitem><para>An instance of <code>ios_base::failure</code> is constructed instead.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#49">49</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#49">49</ulink>:
<emphasis>Underspecification of ios_base::sync_with_stdio</emphasis> <emphasis>Underspecification of ios_base::sync_with_stdio</emphasis>
</term> </term>
<listitem><para>The return type is the <emphasis>previous</emphasis> state of synchronization. <listitem><para>The return type is the <emphasis>previous</emphasis> state of synchronization.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#50">50</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#50">50</ulink>:
<emphasis>Copy constructor and assignment operator of ios_base</emphasis> <emphasis>Copy constructor and assignment operator of ios_base</emphasis>
</term> </term>
<listitem><para>These members functions are declared <code>private</code> and are <listitem><para>These members functions are declared <code>private</code> and are
thus inaccessible. Specifying the correct semantics of thus inaccessible. Specifying the correct semantics of
&quot;copying stream state&quot; was deemed too complicated. &quot;copying stream state&quot; was deemed too complicated.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#60">60</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#60">60</ulink>:
<emphasis>What is a formatted input function?</emphasis> <emphasis>What is a formatted input function?</emphasis>
</term> </term>
<listitem><para>This DR made many widespread changes to <code>basic_istream</code> <listitem><para>This DR made many widespread changes to <code>basic_istream</code>
and <code>basic_ostream</code> all of which have been implemented. and <code>basic_ostream</code> all of which have been implemented.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#63">63</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#63">63</ulink>:
<emphasis>Exception-handling policy for unformatted output</emphasis> <emphasis>Exception-handling policy for unformatted output</emphasis>
</term> </term>
<listitem><para>Make the policy consistent with that of formatted input, unformatted <listitem><para>Make the policy consistent with that of formatted input, unformatted
input, and formatted output. input, and formatted output.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#68">68</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#68">68</ulink>:
<emphasis>Extractors for char* should store null at end</emphasis> <emphasis>Extractors for char* should store null at end</emphasis>
</term> </term>
<listitem><para>And they do now. An editing glitch in the last item in the list of <listitem><para>And they do now. An editing glitch in the last item in the list of
[27.6.1.2.3]/7. [27.6.1.2.3]/7.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#74">74</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#74">74</ulink>:
<emphasis>Garbled text for codecvt::do_max_length</emphasis> <emphasis>Garbled text for codecvt::do_max_length</emphasis>
</term> </term>
<listitem><para>The text of the standard was gibberish. Typos gone rampant. <listitem><para>The text of the standard was gibberish. Typos gone rampant.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#75">75</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#75">75</ulink>:
<emphasis>Contradiction in codecvt::length's argument types</emphasis> <emphasis>Contradiction in codecvt::length's argument types</emphasis>
</term> </term>
<listitem><para>Change the first parameter to <code>stateT&amp;</code> and implement <listitem><para>Change the first parameter to <code>stateT&amp;</code> and implement
the new effects paragraph. the new effects paragraph.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#83">83</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#83">83</ulink>:
<emphasis>string::npos vs. string::max_size()</emphasis> <emphasis>string::npos vs. string::max_size()</emphasis>
</term> </term>
<listitem><para>Safety checks on the size of the string should test against <listitem><para>Safety checks on the size of the string should test against
<code>max_size()</code> rather than <code>npos</code>. <code>max_size()</code> rather than <code>npos</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#90">90</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#90">90</ulink>:
<emphasis>Incorrect description of operator&gt;&gt; for strings</emphasis> <emphasis>Incorrect description of operator&gt;&gt; for strings</emphasis>
</term> </term>
<listitem><para>The effect contain <code>isspace(c,getloc())</code> which must be <listitem><para>The effect contain <code>isspace(c,getloc())</code> which must be
replaced by <code>isspace(c,is.getloc())</code>. replaced by <code>isspace(c,is.getloc())</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#91">91</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#91">91</ulink>:
<emphasis>Description of operator&gt;&gt; and getline() for string&lt;&gt; <emphasis>Description of operator&gt;&gt; and getline() for string&lt;&gt;
might cause endless loop</emphasis> might cause endless loop</emphasis>
</term> </term>
<listitem><para>They behave as a formatted input function and as an unformatted <listitem><para>They behave as a formatted input function and as an unformatted
input function, respectively (except that <code>getline</code> is input function, respectively (except that <code>getline</code> is
not required to set <code>gcount</code>). not required to set <code>gcount</code>).
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#103">103</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#103">103</ulink>:
<emphasis>set::iterator is required to be modifiable, but this allows <emphasis>set::iterator is required to be modifiable, but this allows
modification of keys.</emphasis> modification of keys.</emphasis>
</term> </term>
<listitem><para>For associative containers where the value type is the same as <listitem><para>For associative containers where the value type is the same as
the key type, both <code>iterator</code> and <code>const_iterator the key type, both <code>iterator</code> and <code>const_iterator
</code> are constant iterators. </code> are constant iterators.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#109">109</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#109">109</ulink>:
<emphasis>Missing binders for non-const sequence elements</emphasis> <emphasis>Missing binders for non-const sequence elements</emphasis>
</term> </term>
<listitem><para>The <code>binder1st</code> and <code>binder2nd</code> didn't have an <listitem><para>The <code>binder1st</code> and <code>binder2nd</code> didn't have an
<code>operator()</code> taking a non-const parameter. <code>operator()</code> taking a non-const parameter.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#110">110</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#110">110</ulink>:
<emphasis>istreambuf_iterator::equal not const</emphasis> <emphasis>istreambuf_iterator::equal not const</emphasis>
</term> </term>
<listitem><para>This was not a const member function. Note that the DR says to <listitem><para>This was not a const member function. Note that the DR says to
replace the function with a const one; we have instead provided an replace the function with a const one; we have instead provided an
overloaded version with identical contents. overloaded version with identical contents.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#117">117</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#117">117</ulink>:
<emphasis>basic_ostream uses nonexistent num_put member functions</emphasis> <emphasis>basic_ostream uses nonexistent num_put member functions</emphasis>
</term> </term>
<listitem><para><code>num_put::put()</code> was overloaded on the wrong types. <listitem><para><code>num_put::put()</code> was overloaded on the wrong types.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#118">118</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#118">118</ulink>:
<emphasis>basic_istream uses nonexistent num_get member functions</emphasis> <emphasis>basic_istream uses nonexistent num_get member functions</emphasis>
</term> </term>
<listitem><para>Same as 117, but for <code>num_get::get()</code>. <listitem><para>Same as 117, but for <code>num_get::get()</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#129">129</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#129">129</ulink>:
<emphasis>Need error indication from seekp() and seekg()</emphasis> <emphasis>Need error indication from seekp() and seekg()</emphasis>
</term> </term>
<listitem><para>These functions set <code>failbit</code> on error now. <listitem><para>These functions set <code>failbit</code> on error now.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#130">130</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#130">130</ulink>:
<emphasis>Return type of container::erase(iterator) differs for associative containers</emphasis> <emphasis>Return type of container::erase(iterator) differs for associative containers</emphasis>
</term> </term>
<listitem><para>Make member <code>erase</code> return iterator for <code>set</code>, <code>multiset</code>, <code>map</code>, <code>multimap</code>. <listitem><para>Make member <code>erase</code> return iterator for <code>set</code>, <code>multiset</code>, <code>map</code>, <code>multimap</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#136">136</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#136">136</ulink>:
<emphasis>seekp, seekg setting wrong streams?</emphasis> <emphasis>seekp, seekg setting wrong streams?</emphasis>
</term> </term>
<listitem><para><code>seekp</code> should only set the output stream, and <listitem><para><code>seekp</code> should only set the output stream, and
<code>seekg</code> should only set the input stream. <code>seekg</code> should only set the input stream.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<!--<varlistentry><term><ulink url="../ext/lwg-defects.html#159">159</ulink>: <!--<varlistentry><term><ulink url="../ext/lwg-defects.html#159">159</ulink>:
<emphasis>Strange use of underflow()</emphasis> <emphasis>Strange use of underflow()</emphasis>
</term> </term>
<listitem><para>In fstream.tcc, the basic_filebuf&lt;&gt;::showmanyc() function <listitem><para>In fstream.tcc, the basic_filebuf&lt;&gt;::showmanyc() function
should probably not be calling <code>underflow()</code>. should probably not be calling <code>underflow()</code>.
</para></listitem></varlistentry> --> </para></listitem></varlistentry> -->
<varlistentry><term><ulink url="../ext/lwg-defects.html#167">167</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#167">167</ulink>:
<emphasis>Improper use of traits_type::length()</emphasis> <emphasis>Improper use of traits_type::length()</emphasis>
</term> </term>
<listitem><para><code>op&lt;&lt;</code> with a <code>const char*</code> was <listitem><para><code>op&lt;&lt;</code> with a <code>const char*</code> was
calculating an incorrect number of characters to write. calculating an incorrect number of characters to write.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#169">169</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#169">169</ulink>:
<emphasis>Bad efficiency of overflow() mandated</emphasis> <emphasis>Bad efficiency of overflow() mandated</emphasis>
</term> </term>
<listitem><para>Grow efficiently the internal array object. <listitem><para>Grow efficiently the internal array object.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#171">171</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#171">171</ulink>:
<emphasis>Strange seekpos() semantics due to joint position</emphasis> <emphasis>Strange seekpos() semantics due to joint position</emphasis>
</term> </term>
<listitem><para>Quite complex to summarize... <listitem><para>Quite complex to summarize...
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#181">181</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#181">181</ulink>:
<emphasis>make_pair() unintended behavior</emphasis> <emphasis>make_pair() unintended behavior</emphasis>
</term> </term>
<listitem><para>This function used to take its arguments as reference-to-const, now <listitem><para>This function used to take its arguments as reference-to-const, now
it copies them (pass by value). it copies them (pass by value).
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#195">195</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#195">195</ulink>:
<emphasis>Should basic_istream::sentry's constructor ever set eofbit?</emphasis> <emphasis>Should basic_istream::sentry's constructor ever set eofbit?</emphasis>
</term> </term>
<listitem><para>Yes, it can, specifically if EOF is reached while skipping whitespace. <listitem><para>Yes, it can, specifically if EOF is reached while skipping whitespace.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#211">211</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#211">211</ulink>:
<emphasis>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</emphasis> <emphasis>operator&gt;&gt;(istream&amp;, string&amp;) doesn't set failbit</emphasis>
</term> </term>
<listitem><para>If nothing is extracted into the string, <code>op&gt;&gt;</code> now <listitem><para>If nothing is extracted into the string, <code>op&gt;&gt;</code> now
sets <code>failbit</code> (which can cause an exception, etc., etc.). sets <code>failbit</code> (which can cause an exception, etc., etc.).
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#214">214</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#214">214</ulink>:
<emphasis>set::find() missing const overload</emphasis> <emphasis>set::find() missing const overload</emphasis>
</term> </term>
<listitem><para>Both <code>set</code> and <code>multiset</code> were missing <listitem><para>Both <code>set</code> and <code>multiset</code> were missing
overloaded find, lower_bound, upper_bound, and equal_range functions overloaded find, lower_bound, upper_bound, and equal_range functions
for const instances. for const instances.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#231">231</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#231">231</ulink>:
<emphasis>Precision in iostream?</emphasis> <emphasis>Precision in iostream?</emphasis>
</term> </term>
<listitem><para>For conversion from a floating-point type, <code>str.precision()</code> <listitem><para>For conversion from a floating-point type, <code>str.precision()</code>
is specified in the conversion specification. is specified in the conversion specification.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#233">233</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#233">233</ulink>:
<emphasis>Insertion hints in associative containers</emphasis> <emphasis>Insertion hints in associative containers</emphasis>
</term> </term>
<listitem><para>Implement N1780, first check before then check after, insert as close <listitem><para>Implement N1780, first check before then check after, insert as close
to hint as possible. to hint as possible.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#235">235</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#235">235</ulink>:
<emphasis>No specification of default ctor for reverse_iterator</emphasis> <emphasis>No specification of default ctor for reverse_iterator</emphasis>
</term> </term>
<listitem><para>The declaration of <code>reverse_iterator</code> lists a default constructor. <listitem><para>The declaration of <code>reverse_iterator</code> lists a default constructor.
However, no specification is given what this constructor should do. However, no specification is given what this constructor should do.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#241">241</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#241">241</ulink>:
<emphasis>Does unique_copy() require CopyConstructible and Assignable?</emphasis> <emphasis>Does unique_copy() require CopyConstructible and Assignable?</emphasis>
</term> </term>
<listitem><para>Add a helper for forward_iterator/output_iterator, fix the existing <listitem><para>Add a helper for forward_iterator/output_iterator, fix the existing
one for input_iterator/output_iterator to not rely on Assignability. one for input_iterator/output_iterator to not rely on Assignability.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#243">243</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#243">243</ulink>:
<emphasis>get and getline when sentry reports failure</emphasis> <emphasis>get and getline when sentry reports failure</emphasis>
</term> </term>
<listitem><para>Store a null character only if the character array has a non-zero size. <listitem><para>Store a null character only if the character array has a non-zero size.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#251">251</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#251">251</ulink>:
<emphasis>basic_stringbuf missing allocator_type</emphasis> <emphasis>basic_stringbuf missing allocator_type</emphasis>
</term> </term>
<listitem><para>This nested typedef was originally not specified. <listitem><para>This nested typedef was originally not specified.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#253">253</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#253">253</ulink>:
<emphasis>valarray helper functions are almost entirely useless</emphasis> <emphasis>valarray helper functions are almost entirely useless</emphasis>
</term> </term>
<listitem><para>Make the copy constructor and copy-assignment operator declarations <listitem><para>Make the copy constructor and copy-assignment operator declarations
public in gslice_array, indirect_array, mask_array, slice_array; provide public in gslice_array, indirect_array, mask_array, slice_array; provide
definitions. definitions.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#265">265</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#265">265</ulink>:
<emphasis>std::pair::pair() effects overly restrictive</emphasis> <emphasis>std::pair::pair() effects overly restrictive</emphasis>
</term> </term>
<listitem><para>The default ctor would build its members from copies of temporaries; <listitem><para>The default ctor would build its members from copies of temporaries;
now it simply uses their respective default ctors. now it simply uses their respective default ctors.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#266">266</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#266">266</ulink>:
<emphasis>bad_exception::~bad_exception() missing Effects clause</emphasis> <emphasis>bad_exception::~bad_exception() missing Effects clause</emphasis>
</term> </term>
<listitem><para>The <code>bad_</code>* classes no longer have destructors (they <listitem><para>The <code>bad_</code>* classes no longer have destructors (they
are trivial), since no description of them was ever given. are trivial), since no description of them was ever given.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#271">271</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#271">271</ulink>:
<emphasis>basic_iostream missing typedefs</emphasis> <emphasis>basic_iostream missing typedefs</emphasis>
</term> </term>
<listitem><para>The typedefs it inherits from its base classes can't be used, since <listitem><para>The typedefs it inherits from its base classes can't be used, since
(for example) <code>basic_iostream&lt;T&gt;::traits_type</code> is ambiguous. (for example) <code>basic_iostream&lt;T&gt;::traits_type</code> is ambiguous.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#275">275</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#275">275</ulink>:
<emphasis>Wrong type in num_get::get() overloads</emphasis> <emphasis>Wrong type in num_get::get() overloads</emphasis>
</term> </term>
<listitem><para>Similar to 118. <listitem><para>Similar to 118.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#280">280</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#280">280</ulink>:
<emphasis>Comparison of reverse_iterator to const reverse_iterator</emphasis> <emphasis>Comparison of reverse_iterator to const reverse_iterator</emphasis>
</term> </term>
<listitem><para>Add global functions with two template parameters. <listitem><para>Add global functions with two template parameters.
(NB: not added for now a templated assignment operator) (NB: not added for now a templated assignment operator)
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#292">292</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#292">292</ulink>:
<emphasis>Effects of a.copyfmt (a)</emphasis> <emphasis>Effects of a.copyfmt (a)</emphasis>
</term> </term>
<listitem><para>If <code>(this == &amp;rhs)</code> do nothing. <listitem><para>If <code>(this == &amp;rhs)</code> do nothing.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#300">300</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#300">300</ulink>:
<emphasis>List::merge() specification incomplete</emphasis> <emphasis>List::merge() specification incomplete</emphasis>
</term> </term>
<listitem><para>If <code>(this == &amp;x)</code> do nothing. <listitem><para>If <code>(this == &amp;x)</code> do nothing.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#303">303</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#303">303</ulink>:
<emphasis>Bitset input operator underspecified</emphasis> <emphasis>Bitset input operator underspecified</emphasis>
</term> </term>
<listitem><para>Basically, compare the input character to <listitem><para>Basically, compare the input character to
<code>is.widen(0)</code> and <code>is.widen(1)</code>. <code>is.widen(0)</code> and <code>is.widen(1)</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#305">305</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#305">305</ulink>:
<emphasis>Default behavior of codecvt&lt;wchar_t, char, <emphasis>Default behavior of codecvt&lt;wchar_t, char,
mbstate_t&gt;::length()</emphasis> mbstate_t&gt;::length()</emphasis>
</term> </term>
<listitem><para>Do not specify what <code>codecvt&lt;wchar_t, char, <listitem><para>Do not specify what <code>codecvt&lt;wchar_t, char,
mbstate_t&gt;::do_length</code> must return. mbstate_t&gt;::do_length</code> must return.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#328">328</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#328">328</ulink>:
<emphasis>Bad sprintf format modifier in <emphasis>Bad sprintf format modifier in
money_put&lt;&gt;::do_put()</emphasis> money_put&lt;&gt;::do_put()</emphasis>
</term> </term>
<listitem><para>Change the format string to &quot;%.0Lf&quot;. <listitem><para>Change the format string to &quot;%.0Lf&quot;.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#365">365</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#365">365</ulink>:
<emphasis>Lack of const-qualification in clause 27</emphasis> <emphasis>Lack of const-qualification in clause 27</emphasis>
</term> </term>
<listitem><para>Add const overloads of <code>is_open</code>. <listitem><para>Add const overloads of <code>is_open</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#387">387</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#387">387</ulink>:
<emphasis>std::complex over-encapsulated</emphasis> <emphasis>std::complex over-encapsulated</emphasis>
</term> </term>
<listitem><para>Add the <code>real(T)</code> and <code>imag(T)</code> <listitem><para>Add the <code>real(T)</code> and <code>imag(T)</code>
members; in C++0x mode, also adjust the existing members; in C++0x mode, also adjust the existing
<code>real()</code> and <code>imag()</code> members and <code>real()</code> and <code>imag()</code> members and
free functions. free functions.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#389">389</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#389">389</ulink>:
<emphasis>Const overload of valarray::operator[] returns <emphasis>Const overload of valarray::operator[] returns
by value</emphasis> by value</emphasis>
</term> </term>
<listitem><para>Change it to return a <code>const T&amp;</code>. <listitem><para>Change it to return a <code>const T&amp;</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#396">396</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#396">396</ulink>:
<emphasis>what are characters zero and one</emphasis> <emphasis>what are characters zero and one</emphasis>
</term> </term>
<listitem><para>Implement the proposed resolution. <listitem><para>Implement the proposed resolution.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#402">402</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#402">402</ulink>:
<emphasis>Wrong new expression in [some_]allocator::construct</emphasis> <emphasis>Wrong new expression in [some_]allocator::construct</emphasis>
</term> </term>
<listitem><para>Replace &quot;new&quot; with &quot;::new&quot;. <listitem><para>Replace &quot;new&quot; with &quot;::new&quot;.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-active.html#408">408</ulink>: <varlistentry><term><ulink url="../ext/lwg-active.html#408">408</ulink>:
<emphasis> <emphasis>
Is vector&lt;reverse_iterator&lt;char*&gt; &gt; forbidden? Is vector&lt;reverse_iterator&lt;char*&gt; &gt; forbidden?
</emphasis> </emphasis>
</term> </term>
<listitem><para>Tweak the debug-mode checks in _Safe_iterator. <listitem><para>Tweak the debug-mode checks in _Safe_iterator.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#409">409</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#409">409</ulink>:
<emphasis>Closing an fstream should clear the error state</emphasis> <emphasis>Closing an fstream should clear the error state</emphasis>
</term> </term>
<listitem><para>Have <code>open</code> clear the error flags. <listitem><para>Have <code>open</code> clear the error flags.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-closed.html#431">431</ulink>: <varlistentry><term><ulink url="../ext/lwg-closed.html#431">431</ulink>:
<emphasis>Swapping containers with unequal allocators</emphasis> <emphasis>Swapping containers with unequal allocators</emphasis>
</term> </term>
<listitem><para>Implement Option 3, as per N1599. <listitem><para>Implement Option 3, as per N1599.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#432">432</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#432">432</ulink>:
<emphasis>stringbuf::overflow() makes only one write position <emphasis>stringbuf::overflow() makes only one write position
available</emphasis> available</emphasis>
</term> </term>
<listitem><para>Implement the resolution, beyond DR 169. <listitem><para>Implement the resolution, beyond DR 169.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#434">434</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#434">434</ulink>:
<emphasis>bitset::to_string() hard to use</emphasis> <emphasis>bitset::to_string() hard to use</emphasis>
</term> </term>
<listitem><para>Add three overloads, taking fewer template arguments. <listitem><para>Add three overloads, taking fewer template arguments.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#438">438</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#438">438</ulink>:
<emphasis>Ambiguity in the "do the right thing" clause</emphasis> <emphasis>Ambiguity in the "do the right thing" clause</emphasis>
</term> </term>
<listitem><para>Implement the resolution, basically cast less. <listitem><para>Implement the resolution, basically cast less.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#453">453</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#453">453</ulink>:
<emphasis>basic_stringbuf::seekoff need not always fail for an empty stream</emphasis> <emphasis>basic_stringbuf::seekoff need not always fail for an empty stream</emphasis>
</term> </term>
<listitem><para>Don't fail if the next pointer is null and newoff is zero. <listitem><para>Don't fail if the next pointer is null and newoff is zero.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#455">455</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#455">455</ulink>:
<emphasis>cerr::tie() and wcerr::tie() are overspecified</emphasis> <emphasis>cerr::tie() and wcerr::tie() are overspecified</emphasis>
</term> </term>
<listitem><para>Initialize cerr tied to cout and wcerr tied to wcout. <listitem><para>Initialize cerr tied to cout and wcerr tied to wcout.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#464">464</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#464">464</ulink>:
<emphasis>Suggestion for new member functions in standard containers</emphasis> <emphasis>Suggestion for new member functions in standard containers</emphasis>
</term> </term>
<listitem><para>Add <code>data()</code> to <code>std::vector</code> and <listitem><para>Add <code>data()</code> to <code>std::vector</code> and
<code>at(const key_type&amp;)</code> to <code>std::map</code>. <code>at(const key_type&amp;)</code> to <code>std::map</code>.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#508">508</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#508">508</ulink>:
<emphasis>Bad parameters for ranlux64_base_01</emphasis> <emphasis>Bad parameters for ranlux64_base_01</emphasis>
</term> </term>
<listitem><para>Fix the parameters. <listitem><para>Fix the parameters.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-closed.html#512">512</ulink>: <varlistentry><term><ulink url="../ext/lwg-closed.html#512">512</ulink>:
<emphasis>Seeding subtract_with_carry_01 from a single unsigned long</emphasis> <emphasis>Seeding subtract_with_carry_01 from a single unsigned long</emphasis>
</term> </term>
<listitem><para>Construct a <code>linear_congruential</code> engine and seed with it. <listitem><para>Construct a <code>linear_congruential</code> engine and seed with it.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-closed.html#526">526</ulink>: <varlistentry><term><ulink url="../ext/lwg-closed.html#526">526</ulink>:
<emphasis>Is it undefined if a function in the standard changes in <emphasis>Is it undefined if a function in the standard changes in
parameters?</emphasis> parameters?</emphasis>
</term> </term>
<listitem><para>Use &amp;value. <listitem><para>Use &amp;value.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#538">538</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#538">538</ulink>:
<emphasis>241 again: Does unique_copy() require CopyConstructible <emphasis>241 again: Does unique_copy() require CopyConstructible
and Assignable?</emphasis> and Assignable?</emphasis>
</term> </term>
<listitem><para>In case of input_iterator/output_iterator rely on Assignability of <listitem><para>In case of input_iterator/output_iterator rely on Assignability of
input_iterator' value_type. input_iterator' value_type.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-active.html#539">539</ulink>: <varlistentry><term><ulink url="../ext/lwg-active.html#539">539</ulink>:
<emphasis>partial_sum and adjacent_difference should mention <emphasis>partial_sum and adjacent_difference should mention
requirements</emphasis> requirements</emphasis>
</term> </term>
<listitem><para>We were almost doing the right thing, just use std::move <listitem><para>We were almost doing the right thing, just use std::move
in adjacent_difference. in adjacent_difference.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#541">541</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#541">541</ulink>:
<emphasis>shared_ptr template assignment and void</emphasis> <emphasis>shared_ptr template assignment and void</emphasis>
</term> </term>
<listitem><para>Add an auto_ptr&lt;void&gt; specialization. <listitem><para>Add an auto_ptr&lt;void&gt; specialization.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#543">543</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#543">543</ulink>:
<emphasis>valarray slice default constructor</emphasis> <emphasis>valarray slice default constructor</emphasis>
</term> </term>
<listitem><para>Follow the straightforward proposed resolution. <listitem><para>Follow the straightforward proposed resolution.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#550">550</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#550">550</ulink>:
<emphasis>What should the return type of pow(float,int) be?</emphasis> <emphasis>What should the return type of pow(float,int) be?</emphasis>
</term> </term>
<listitem><para>In C++0x mode, remove the pow(float,int), etc., signatures. <listitem><para>In C++0x mode, remove the pow(float,int), etc., signatures.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#586">586</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#586">586</ulink>:
<emphasis>string inserter not a formatted function</emphasis> <emphasis>string inserter not a formatted function</emphasis>
</term> </term>
<listitem><para>Change it to be a formatted output function (i.e. catch exceptions). <listitem><para>Change it to be a formatted output function (i.e. catch exceptions).
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#596">596</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#596">596</ulink>:
<emphasis>27.8.1.3 Table 112 omits "a+" and "a+b" modes</emphasis> <emphasis>27.8.1.3 Table 112 omits "a+" and "a+b" modes</emphasis>
</term> </term>
<listitem><para>Add the missing modes to fopen_mode. <listitem><para>Add the missing modes to fopen_mode.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#630">630</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#630">630</ulink>:
<emphasis>arrays of valarray</emphasis> <emphasis>arrays of valarray</emphasis>
</term> </term>
<listitem><para>Implement the simple resolution. <listitem><para>Implement the simple resolution.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#660">660</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#660">660</ulink>:
<emphasis>Missing bitwise operations</emphasis> <emphasis>Missing bitwise operations</emphasis>
</term> </term>
<listitem><para>Add the missing operations. <listitem><para>Add the missing operations.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#691">691</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#691">691</ulink>:
<emphasis>const_local_iterator cbegin, cend missing from TR1</emphasis> <emphasis>const_local_iterator cbegin, cend missing from TR1</emphasis>
</term> </term>
<listitem><para>In C++0x mode add cbegin(size_type) and cend(size_type) <listitem><para>In C++0x mode add cbegin(size_type) and cend(size_type)
to the unordered containers. to the unordered containers.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#693">693</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#693">693</ulink>:
<emphasis>std::bitset::all() missing</emphasis> <emphasis>std::bitset::all() missing</emphasis>
</term> </term>
<listitem><para>Add it, consistently with the discussion. <listitem><para>Add it, consistently with the discussion.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#695">695</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#695">695</ulink>:
<emphasis>ctype&lt;char&gt;::classic_table() not accessible</emphasis> <emphasis>ctype&lt;char&gt;::classic_table() not accessible</emphasis>
</term> </term>
<listitem><para>Make the member functions table and classic_table public. <listitem><para>Make the member functions table and classic_table public.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#696">696</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#696">696</ulink>:
<emphasis>istream::operator&gt;&gt;(int&amp;) broken</emphasis> <emphasis>istream::operator&gt;&gt;(int&amp;) broken</emphasis>
</term> </term>
<listitem><para>Implement the straightforward resolution. <listitem><para>Implement the straightforward resolution.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#761">761</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#761">761</ulink>:
<emphasis>unordered_map needs an at() member function</emphasis> <emphasis>unordered_map needs an at() member function</emphasis>
</term> </term>
<listitem><para>In C++0x mode, add at() and at() const. <listitem><para>In C++0x mode, add at() and at() const.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#775">775</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#775">775</ulink>:
<emphasis>Tuple indexing should be unsigned?</emphasis> <emphasis>Tuple indexing should be unsigned?</emphasis>
</term> </term>
<listitem><para>Implement the int -> size_t replacements. <listitem><para>Implement the int -> size_t replacements.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#776">776</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#776">776</ulink>:
<emphasis>Undescribed assign function of std::array</emphasis> <emphasis>Undescribed assign function of std::array</emphasis>
</term> </term>
<listitem><para>In C++0x mode, remove assign, add fill. <listitem><para>In C++0x mode, remove assign, add fill.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#781">781</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#781">781</ulink>:
<emphasis>std::complex should add missing C99 functions</emphasis> <emphasis>std::complex should add missing C99 functions</emphasis>
</term> </term>
<listitem><para>In C++0x mode, add std::proj. <listitem><para>In C++0x mode, add std::proj.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#809">809</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#809">809</ulink>:
<emphasis>std::swap should be overloaded for array types</emphasis> <emphasis>std::swap should be overloaded for array types</emphasis>
</term> </term>
<listitem><para>Add the overload. <listitem><para>Add the overload.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#844">844</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#844">844</ulink>:
<emphasis>complex pow return type is ambiguous</emphasis> <emphasis>complex pow return type is ambiguous</emphasis>
</term> </term>
<listitem><para>In C++0x mode, remove the pow(complex&lt;T&gt;, int) signature. <listitem><para>In C++0x mode, remove the pow(complex&lt;T&gt;, int) signature.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-defects.html#853">853</ulink>: <varlistentry><term><ulink url="../ext/lwg-defects.html#853">853</ulink>:
<emphasis>to_string needs updating with zero and one</emphasis> <emphasis>to_string needs updating with zero and one</emphasis>
</term> </term>
<listitem><para>Update / add the signatures. <listitem><para>Update / add the signatures.
</para></listitem></varlistentry> </para></listitem></varlistentry>
<varlistentry><term><ulink url="../ext/lwg-active.html#865">865</ulink>: <varlistentry><term><ulink url="../ext/lwg-active.html#865">865</ulink>:
<emphasis>More algorithms that throw away information</emphasis> <emphasis>More algorithms that throw away information</emphasis>
</term> </term>
<listitem><para>The traditional HP / SGI return type and value is blessed <listitem><para>The traditional HP / SGI return type and value is blessed
by the resolution of the DR. by the resolution of the DR.
</para></listitem></varlistentry> </para></listitem></varlistentry>
</variablelist> </variablelist>
</sect2> </sect2>
</sect1> </sect1>
</chapter> </chapter>
...@@ -859,12 +859,12 @@ requirements of the license of GCC. ...@@ -859,12 +859,12 @@ requirements of the license of GCC.
</para> </para>
<!-- Section 01 : Prerequisites --> <!-- Section 01 : Prerequisites -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="prerequisites.xml"> parse="xml" href="prerequisites.xml">
</xi:include> </xi:include>
<!-- Section 02 : Configure --> <!-- Section 02 : Configure -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="configure.xml"> parse="xml" href="configure.xml">
</xi:include> </xi:include>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.io" xreflabel="Input and Output"> <chapter id="std.io" xreflabel="Input and Output">
<?dbhtml filename="io.html"?> <?dbhtml filename="io.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Input and Output Input and Output
<indexterm><primary>Input and Output</primary></indexterm> <indexterm><primary>Input and Output</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Iostream Objects --> <!-- Sect1 01 : Iostream Objects -->
<chapter id="manual.io.objects" xreflabel="IO Objects"> <sect1 id="std.io.objects" xreflabel="IO Objects">
<?dbhtml filename="iostream_objects.html"?> <?dbhtml filename="iostream_objects.html"?>
<title>Iostream Objects</title> <title>Iostream Objects</title>
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
class MyClass class MyClass
{ {
.... ....
std::ifstream&amp; input_file; std::ifstream&amp; input_file;
}; };
extern std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, MyClass&amp;); extern std::ostream&amp; operator&lt;&lt; (std::ostream&amp;, MyClass&amp;);
...@@ -115,19 +115,19 @@ ...@@ -115,19 +115,19 @@
namespace std namespace std
{ {
extern istream cin; extern istream cin;
extern ostream cout; extern ostream cout;
.... ....
// this is explained below // this is explained below
<emphasis>static ios_base::Init __foo;</emphasis> // not its real name <emphasis>static ios_base::Init __foo;</emphasis> // not its real name
} }
</programlisting> </programlisting>
<para>Now, the runtime penalty mentioned previously: the global objects <para>Now, the runtime penalty mentioned previously: the global objects
must be initialized before any of your own code uses them; this is must be initialized before any of your own code uses them; this is
guaranteed by the standard. Like any other global object, they must guaranteed by the standard. Like any other global object, they must
be initialized once and only once. This is typically done with a be initialized once and only once. This is typically done with a
construct like the one above, and the nested class ios_base::Init is construct like the one above, and the nested class ios_base::Init is
specified in the standard for just this reason. specified in the standard for just this reason.
</para> </para>
<para>How does it work? Because the header is included before any of your <para>How does it work? Because the header is included before any of your
...@@ -157,14 +157,14 @@ ...@@ -157,14 +157,14 @@
compile times will go down when there's less parsing work to do. compile times will go down when there's less parsing work to do.
</para> </para>
</chapter> </sect1>
<!-- Chapter 02 : Stream Buffers --> <!-- Sect1 02 : Stream Buffers -->
<chapter id="manual.io.streambufs" xreflabel="Stream Buffers"> <sect1 id="std.io.streambufs" xreflabel="Stream Buffers">
<?dbhtml filename="streambufs.html"?> <?dbhtml filename="streambufs.html"?>
<title>Stream Buffers</title> <title>Stream Buffers</title>
<sect1 id="io.streambuf.derived" xreflabel="Derived streambuf Classes"> <sect2 id="io.streambuf.derived" xreflabel="Derived streambuf Classes">
<title>Derived streambuf Classes</title> <title>Derived streambuf Classes</title>
<para> <para>
</para> </para>
...@@ -227,11 +227,11 @@ ...@@ -227,11 +227,11 @@
Streambufs</ulink>. Streambufs</ulink>.
</para> </para>
</sect1> </sect2>
<sect1 id="io.streambuf.buffering" xreflabel="Buffering"> <sect2 id="io.streambuf.buffering" xreflabel="Buffering">
<title>Buffering</title> <title>Buffering</title>
<para>First, are you sure that you understand buffering? Particularly <para>First, are you sure that you understand buffering? Chaptericularly
the fact that C++ may not, in fact, have anything to do with it? the fact that C++ may not, in fact, have anything to do with it?
</para> </para>
<para>The rules for buffering can be a little odd, but they aren't any <para>The rules for buffering can be a little odd, but they aren't any
...@@ -261,8 +261,8 @@ ...@@ -261,8 +261,8 @@
</para> </para>
<programlisting> <programlisting>
output &lt;&lt; &quot;a line of text\n&quot; output &lt;&lt; &quot;a line of text\n&quot;
&lt;&lt; some_data_variable &lt;&lt; '\n' &lt;&lt; some_data_variable &lt;&lt; '\n'
&lt;&lt; &quot;another line of text\n&quot;; </programlisting> &lt;&lt; &quot;another line of text\n&quot;; </programlisting>
<para>I have also joined the output statements into a single statement. <para>I have also joined the output statements into a single statement.
You could make the code prettier by moving the single newline to You could make the code prettier by moving the single newline to
the start of the quoted text on the last line, for example. the start of the quoted text on the last line, for example.
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
output &lt;&lt; ...... &lt;&lt; flush; // can use std::flush manipulator output &lt;&lt; ...... &lt;&lt; flush; // can use std::flush manipulator
output.flush(); // or call a member fn </programlisting> output.flush(); // or call a member fn </programlisting>
<para>On the other hand, there are times when writing to a file should <para>On the other hand, there are times when writing to a file should
be like writing to standard error; no buffering should be done be like writing to standard error; no buffering should be done
because the data needs to appear quickly (a prime example is a because the data needs to appear quickly (a prime example is a
log file for security-related information). The way to do this is log file for security-related information). The way to do this is
just to turn off the buffering <emphasis>before any I/O operations at just to turn off the buffering <emphasis>before any I/O operations at
...@@ -296,14 +296,14 @@ ...@@ -296,14 +296,14 @@
is &gt;&gt; i; // and this will probably cause a disk read </programlisting> is &gt;&gt; i; // and this will probably cause a disk read </programlisting>
<para>Since all aspects of buffering are handled by a streambuf-derived <para>Since all aspects of buffering are handled by a streambuf-derived
member, it is necessary to get at that member with <code>rdbuf()</code>. member, it is necessary to get at that member with <code>rdbuf()</code>.
Then the public version of <code>setbuf</code> can be called. The Then the public version of <code>setbuf</code> can be called. The
arguments are the same as those for the Standard C I/O Library arguments are the same as those for the Standard C I/O Library
function (a buffer area followed by its size). function (a buffer area followed by its size).
</para> </para>
<para>A great deal of this is implementation-dependent. For example, <para>A great deal of this is implementation-dependent. For example,
<code>streambuf</code> does not specify any actions for its own <code>streambuf</code> does not specify any actions for its own
<code>setbuf()</code>-ish functions; the classes derived from <code>setbuf()</code>-ish functions; the classes derived from
<code>streambuf</code> each define behavior that &quot;makes <code>streambuf</code> each define behavior that &quot;makes
sense&quot; for that class: an argument of (0,0) turns off buffering sense&quot; for that class: an argument of (0,0) turns off buffering
for <code>filebuf</code> but does nothing at all for its siblings for <code>filebuf</code> but does nothing at all for its siblings
<code>stringbuf</code> and <code>strstreambuf</code>, and specifying <code>stringbuf</code> and <code>strstreambuf</code>, and specifying
...@@ -320,21 +320,21 @@ ...@@ -320,21 +320,21 @@
changing those are system-dependent. changing those are system-dependent.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 03 : Memory-based Streams --> <!-- Sect1 03 : Memory-based Streams -->
<chapter id="manual.io.memstreams" xreflabel="Memory Streams"> <sect1 id="std.io.memstreams" xreflabel="Memory Streams">
<?dbhtml filename="stringstreams.html"?> <?dbhtml filename="stringstreams.html"?>
<title>Memory Based Streams</title> <title>Memory Based Streams</title>
<sect1 id="manual.io.memstreams.compat" xreflabel="Compatibility strstream"> <sect2 id="std.io.memstreams.compat" xreflabel="Compatibility strstream">
<title>Compatibility With strstream</title> <title>Compatibility With strstream</title>
<para> <para>
</para> </para>
<para>Stringstreams (defined in the header <code>&lt;sstream&gt;</code>) <para>Stringstreams (defined in the header <code>&lt;sstream&gt;</code>)
are in this author's opinion one of the coolest things since are in this author's opinion one of the coolest things since
sliced time. An example of their use is in the Received Wisdom sliced time. An example of their use is in the Received Wisdom
section for Chapter 21 (Strings), section for Sect1 21 (Strings),
<link linkend="strings.string.Cstring"> describing how to <link linkend="strings.string.Cstring"> describing how to
format strings</link>. format strings</link>.
</para> </para>
...@@ -367,15 +367,15 @@ ...@@ -367,15 +367,15 @@
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 04 : File-based Streams --> <!-- Sect1 04 : File-based Streams -->
<chapter id="manual.io.filestreams" xreflabel="File Streams"> <sect1 id="std.io.filestreams" xreflabel="File Streams">
<?dbhtml filename="fstreams.html"?> <?dbhtml filename="fstreams.html"?>
<title>File Based Streams</title> <title>File Based Streams</title>
<sect1 id="manual.io.filestreams.copying_a_file" xreflabel="Copying a File"> <sect2 id="std.io.filestreams.copying_a_file" xreflabel="Copying a File">
<title>Copying a File</title> <title>Copying a File</title>
<para> <para>
</para> </para>
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
<para>Seriously, go do it. Get surprised, then come back. It's worth it. <para>Seriously, go do it. Get surprised, then come back. It's worth it.
</para> </para>
<para>The thing to remember is that the <code>basic_[io]stream</code> classes <para>The thing to remember is that the <code>basic_[io]stream</code> classes
handle formatting, nothing else. In particular, they break up on handle formatting, nothing else. In chaptericular, they break up on
whitespace. The actual reading, writing, and storing of data is whitespace. The actual reading, writing, and storing of data is
handled by the <code>basic_streambuf</code> family. Fortunately, the handled by the <code>basic_streambuf</code> family. Fortunately, the
<code>operator&lt;&lt;</code> is overloaded to take an ostream and <code>operator&lt;&lt;</code> is overloaded to take an ostream and
...@@ -416,7 +416,7 @@ ...@@ -416,7 +416,7 @@
<para>Why a <emphasis>pointer</emphasis> to streambuf and not just a streambuf? Well, <para>Why a <emphasis>pointer</emphasis> to streambuf and not just a streambuf? Well,
the [io]streams hold pointers (or references, depending on the the [io]streams hold pointers (or references, depending on the
implementation) to their buffers, not the actual implementation) to their buffers, not the actual
buffers. This allows polymorphic behavior on the part of the buffers buffers. This allows polymorphic behavior on the chapter of the buffers
as well as the streams themselves. The pointer is easily retrieved as well as the streams themselves. The pointer is easily retrieved
using the <code>rdbuf()</code> member function. Therefore, the easiest using the <code>rdbuf()</code> member function. Therefore, the easiest
way to copy the file is: way to copy the file is:
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
<programlisting> <programlisting>
OUT &lt;&lt; IN.rdbuf();</programlisting> OUT &lt;&lt; IN.rdbuf();</programlisting>
<para>So what <emphasis>was</emphasis> happening with OUT&lt;&lt;IN? Undefined <para>So what <emphasis>was</emphasis> happening with OUT&lt;&lt;IN? Undefined
behavior, since that particular &lt;&lt; isn't defined by the Standard. behavior, since that chaptericular &lt;&lt; isn't defined by the Standard.
I have seen instances where it is implemented, but the character I have seen instances where it is implemented, but the character
extraction process removes all the whitespace, leaving you with no extraction process removes all the whitespace, leaving you with no
blank lines and only &quot;Thequickbrownfox...&quot;. With blank lines and only &quot;Thequickbrownfox...&quot;. With
...@@ -433,15 +433,15 @@ ...@@ -433,15 +433,15 @@
file then contains a perfect text representation of a hexadecimal file then contains a perfect text representation of a hexadecimal
address (quite a big surprise). Others don't compile at all. address (quite a big surprise). Others don't compile at all.
</para> </para>
<para>Also note that none of this is specific to o<emphasis>*f*</emphasis>streams. <para>Also note that none of this is specific to o<emphasis>*f*</emphasis>streams.
The operators shown above are all defined in the parent The operators shown above are all defined in the parent
basic_ostream class and are therefore available with all possible basic_ostream class and are therefore available with all possible
descendants. descendants.
</para> </para>
</sect1> </sect2>
<sect1 id="manual.io.filestreams.binary" xreflabel="Binary Input and Output"> <sect2 id="std.io.filestreams.binary" xreflabel="Binary Input and Output">
<title>Binary Input and Output</title> <title>Binary Input and Output</title>
<para> <para>
</para> </para>
...@@ -468,12 +468,12 @@ ...@@ -468,12 +468,12 @@
under Windows won't accidentally get mapped to a '\n' character, etc. under Windows won't accidentally get mapped to a '\n' character, etc.
Binary mode is not supposed to suddenly give you a bitstream, and Binary mode is not supposed to suddenly give you a bitstream, and
if it is doing so in your program then you've discovered a bug in if it is doing so in your program then you've discovered a bug in
your vendor's compiler (or some other part of the C++ implementation, your vendor's compiler (or some other chapter of the C++ implementation,
possibly the runtime system). possibly the runtime system).
</para> </para>
<para>Second, using <code>&lt;&lt;</code> to write and <code>&gt;&gt;</code> to <para>Second, using <code>&lt;&lt;</code> to write and <code>&gt;&gt;</code> to
read isn't going to work with the standard file stream classes, even read isn't going to work with the standard file stream classes, even
if you use <code>skipws</code> during reading. Why not? Because if you use <code>skipws</code> during reading. Why not? Because
ifstream and ofstream exist for the purpose of <emphasis>formatting</emphasis>, ifstream and ofstream exist for the purpose of <emphasis>formatting</emphasis>,
not reading and writing. Their job is to interpret the data into not reading and writing. Their job is to interpret the data into
text characters, and that's exactly what you don't want to happen text characters, and that's exactly what you don't want to happen
...@@ -492,14 +492,14 @@ ...@@ -492,14 +492,14 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><quote>Derive your own fstream-type classes and write your own <para><quote>Derive your own fstream-type classes and write your own
&lt;&lt;/&gt;&gt; operators to do binary I/O on whatever data &lt;&lt;/&gt;&gt; operators to do binary I/O on whatever data
types you're using.</quote> types you're using.</quote>
</para> </para>
<para> <para>
This is a Bad Thing, because while This is a Bad Thing, because while
the compiler would probably be just fine with it, other humans the compiler would probably be just fine with it, other humans
are going to be confused. The overloaded bitshift operators are going to be confused. The overloaded bitshift operators
have a well-defined meaning (formatting), and this breaks it. have a well-defined meaning (formatting), and this breaks it.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
...@@ -521,10 +521,10 @@ ...@@ -521,10 +521,10 @@
<quote>Use streambufs, that's what they're there for.</quote> <quote>Use streambufs, that's what they're there for.</quote>
</para> </para>
<para> <para>
While not trivial for the beginner, this is the best of all While not trivial for the beginner, this is the best of all
solutions. The streambuf/filebuf layer is the layer that is solutions. The streambuf/filebuf layer is the layer that is
responsible for actual I/O. If you want to use the C++ responsible for actual I/O. If you want to use the C++
library for binary I/O, this is where you start. library for binary I/O, this is where you start.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
...@@ -552,7 +552,7 @@ ...@@ -552,7 +552,7 @@
</para> </para>
<para>Another area of problems is opening text files in binary mode. <para>Another area of problems is opening text files in binary mode.
Generally, binary mode is intended for binary files, and opening Generally, binary mode is intended for binary files, and opening
text files in binary mode means that you now have to deal with all of text files in binary mode means that you now have to deal with all of
those end-of-line and end-of-file problems that we mentioned before. those end-of-line and end-of-file problems that we mentioned before.
</para> </para>
<para> <para>
...@@ -569,17 +569,17 @@ ...@@ -569,17 +569,17 @@
invocation of a program to another invocation of the same program invocation of a program to another invocation of the same program
on a different platform, etc. on a different platform, etc.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 03 : Interacting with C --> <!-- Sect1 03 : Interacting with C -->
<chapter id="manual.io.c" xreflabel="Interacting with C"> <sect1 id="std.io.c" xreflabel="Interacting with C">
<?dbhtml filename="io_and_c.html"?> <?dbhtml filename="io_and_c.html"?>
<title>Interacting with C</title> <title>Interacting with C</title>
<sect1 id="manual.io.c.FILE" xreflabel="Using FILE* and file descriptors"> <sect2 id="std.io.c.FILE" xreflabel="Using FILE* and file descriptors">
<title>Using FILE* and file descriptors</title> <title>Using FILE* and file descriptors</title>
<para> <para>
See the <link linkend="manual.ext.io">extensions</link> for using See the <link linkend="manual.ext.io">extensions</link> for using
...@@ -587,9 +587,9 @@ ...@@ -587,9 +587,9 @@
<classname>ofstream</classname> and <classname>ofstream</classname> and
<classname>ifstream</classname>. <classname>ifstream</classname>.
</para> </para>
</sect1> </sect2>
<sect1 id="manual.io.c.sync" xreflabel="Performance Issues"> <sect2 id="std.io.c.sync" xreflabel="Performance Issues">
<title>Performance</title> <title>Performance</title>
<para> <para>
Pathetic Performance? Ditch C. Pathetic Performance? Ditch C.
...@@ -641,13 +641,13 @@ ...@@ -641,13 +641,13 @@
<para>Note, by the way, that the synchronization requirement only applies to <para>Note, by the way, that the synchronization requirement only applies to
the standard streams (<code>cin</code>, <code>cout</code>, the standard streams (<code>cin</code>, <code>cout</code>,
<code>cerr</code>, <code>cerr</code>,
<code>clog</code>, and their wide-character counterparts). File stream <code>clog</code>, and their wide-character counterchapters). File stream
objects that you declare yourself have no such requirement and are fully objects that you declare yourself have no such requirement and are fully
buffered. buffered.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
</part> </chapter>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.iterators" xreflabel="Iterators"> <chapter id="std.iterators" xreflabel="Iterators">
<?dbhtml filename="iterators.html"?> <?dbhtml filename="iterators.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Iterators Iterators
<indexterm><primary>Iterators</primary></indexterm> <indexterm><primary>Iterators</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Predefined --> <!-- Sect1 01 : Predefined -->
<chapter id="manual.iterators.predefined" xreflabel="Predefined"> <sect1 id="std.iterators.predefined" xreflabel="Predefined">
<title>Predefined</title> <title>Predefined</title>
<sect1 id="iterators.predefined.vs_pointers" xreflabel="Versus Pointers"> <sect2 id="iterators.predefined.vs_pointers" xreflabel="Versus Pointers">
<title>Iterators vs. Pointers</title> <title>Iterators vs. Pointers</title>
<para> <para>
The following The following
...@@ -35,39 +35,45 @@ iterators are not implemented as pointers. They are a generalization ...@@ -35,39 +35,45 @@ iterators are not implemented as pointers. They are a generalization
of pointers, but they are implemented in libstdc++ as separate of pointers, but they are implemented in libstdc++ as separate
classes. classes.
</para> </para>
<para>Keeping that simple fact in mind as you design your code will <para>
Keeping that simple fact in mind as you design your code will
prevent a whole lot of difficult-to-understand bugs. prevent a whole lot of difficult-to-understand bugs.
</para> </para>
<para>You can think of it the other way 'round, even. Since iterators <para>
are a generalization, that means that <emphasis>pointers</emphasis> are You can think of it the other way 'round, even. Since iterators
<emphasis>iterators</emphasis>, and that pointers can be used whenever an are a generalization, that means
iterator would be. All those functions in the Algorithms chapter that <emphasis>pointers</emphasis> are
of the Standard will work just as well on plain arrays and their <emphasis>iterators</emphasis>, and that pointers can be used
pointers. whenever an iterator would be. All those functions in the
</para> Algorithms sect1 of the Standard will work just as well on plain
<para>That doesn't mean that when you pass in a pointer, it gets wrapped arrays and their pointers.
into some special delegating iterator-to-pointer class with a layer </para>
of overhead. (If you think that's the case anywhere, you don't <para>
understand templates to begin with...) Oh, no; if you pass That doesn't mean that when you pass in a pointer, it gets
in a pointer, then the compiler will instantiate that template wrapped into some special delegating iterator-to-pointer class
using T* as a type, and good old high-speed pointer arithmetic as with a layer of overhead. (If you think that's the case
its operations, so the resulting code will be doing exactly the same anywhere, you don't understand templates to begin with...) Oh,
things as it would be doing if you had hand-coded it yourself (for no; if you pass in a pointer, then the compiler will instantiate
the 273rd time). that template using T* as a type, and good old high-speed
</para> pointer arithmetic as its operations, so the resulting code will
<para>How much overhead <emphasis>is</emphasis> there when using an iterator class? be doing exactly the same things as it would be doing if you had
Very little. Most of the layering classes contain nothing but hand-coded it yourself (for the 273rd time).
typedefs, and typedefs are &quot;meta-information&quot; that simply </para>
tell the compiler some nicknames; they don't create code. That <para>
information gets passed down through inheritance, so while the How much overhead <emphasis>is</emphasis> there when using an
compiler has to do work looking up all the names, your runtime code iterator class? Very little. Most of the layering classes
does not. (This has been a prime concern from the beginning.) contain nothing but typedefs, and typedefs are
</para> &quot;meta-information&quot; that simply tell the compiler some
nicknames; they don't create code. That information gets passed
down through inheritance, so while the compiler has to do work
looking up all the names, your runtime code does not. (This has
been a prime concern from the beginning.)
</para>
</sect1> </sect2>
<sect1 id="iterators.predefined.end" xreflabel="end() Is One Past the End"> <sect2 id="iterators.predefined.end" xreflabel="end() Is One Past the End">
<title>One Past the End</title> <title>One Past the End</title>
<para>This starts off sounding complicated, but is actually very easy, <para>This starts off sounding complicated, but is actually very easy,
...@@ -85,23 +91,23 @@ classes. ...@@ -85,23 +91,23 @@ classes.
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>You can point anywhere in the array, <emphasis>or to the first element <para>You can point anywhere in the array, <emphasis>or to the first element
past the end of the array</emphasis>. A pointer that points to one past the end of the array</emphasis>. A pointer that points to one
past the end of the array is guaranteed to be as unique as a past the end of the array is guaranteed to be as unique as a
pointer to somewhere inside the array, so that you can compare pointer to somewhere inside the array, so that you can compare
such pointers safely. such pointers safely.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>You can only dereference a pointer that points into an array. <para>You can only dereference a pointer that points into an array.
If your array pointer points outside the array -- even to just If your array pointer points outside the array -- even to just
one past the end -- and you dereference it, Bad Things happen. one past the end -- and you dereference it, Bad Things happen.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>Strictly speaking, simply pointing anywhere else invokes <para>Strictly speaking, simply pointing anywhere else invokes
undefined behavior. Most programs won't puke until such a undefined behavior. Most programs won't puke until such a
pointer is actually dereferenced, but the standards leave that pointer is actually dereferenced, but the standards leave that
up to the platform. up to the platform.
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
...@@ -121,7 +127,7 @@ classes. ...@@ -121,7 +127,7 @@ classes.
| | remember to add or subtract one. | | remember to add or subtract one.
| | Off-by-one bugs very common here. | | Off-by-one bugs very common here.
V V V V
array of N elements array of N elements
|---|---|--...--|---|---| |---|---|--...--|---|---|
| 0 | 1 | ... |N-2|N-1| | 0 | 1 | ... |N-2|N-1|
|---|---|--...--|---|---| |---|---|--...--|---|---|
...@@ -134,7 +140,7 @@ classes. ...@@ -134,7 +140,7 @@ classes.
beginning end beginning end
</programlisting> </programlisting>
<para>See? Everything between the boundary markers is part of the array. <para>See? Everything between the boundary markers is chapter of the array.
Simple. Simple.
</para> </para>
<para>Now think back to your junior-high school algebra course, when you <para>Now think back to your junior-high school algebra course, when you
...@@ -175,9 +181,9 @@ classes. ...@@ -175,9 +181,9 @@ classes.
<para>Just don't dereference <code>end()</code>. <para>Just don't dereference <code>end()</code>.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 02 : Stream --> <!-- Sect1 02 : Stream -->
</part> </chapter>
<sect1 id="manual.localization.locales.locale" xreflabel="Locale"> <section id="std.localization.locales.locale" xreflabel="Locale">
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
locale locale
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>locale</title> <title>locale</title>
...@@ -19,7 +19,7 @@ classes id, facet, and the reference-counted implementation object, ...@@ -19,7 +19,7 @@ classes id, facet, and the reference-counted implementation object,
class _Impl. class _Impl.
</para> </para>
<sect2 id="locales.locale.req"> <section id="locales.locale.req">
<title>Requirements</title> <title>Requirements</title>
<para> <para>
...@@ -87,9 +87,9 @@ class id ...@@ -87,9 +87,9 @@ class id
<para> <para>
Provides an index for looking up specific facets. Provides an index for looking up specific facets.
</para> </para>
</sect2> </section>
<sect2 id="locales.locale.design"> <section id="locales.locale.design">
<title>Design</title> <title>Design</title>
<para> <para>
...@@ -103,12 +103,12 @@ Because C and earlier versions of POSIX fall down so completely, ...@@ -103,12 +103,12 @@ Because C and earlier versions of POSIX fall down so completely,
portability is an issue. portability is an issue.
</para> </para>
</sect2> </section>
<sect2 id="locales.locale.impl"> <section id="locales.locale.impl">
<title>Implementation</title> <title>Implementation</title>
<sect3 id="locale.impl.c"> <section id="locale.impl.c">
<title>Interacting with &quot;C&quot; locales</title> <title>Interacting with &quot;C&quot; locales</title>
<itemizedlist> <itemizedlist>
...@@ -467,10 +467,10 @@ global locale" (emphasis Paolo), that is: ...@@ -467,10 +467,10 @@ global locale" (emphasis Paolo), that is:
practice, the set of LC_ALL, LANG, etc. variable of the shell. practice, the set of LC_ALL, LANG, etc. variable of the shell.
</para> </para>
</sect3> </section>
</sect2> </section>
<sect2 id="locales.locale.future"> <section id="locales.locale.future">
<title>Future</title> <title>Future</title>
<itemizedlist> <itemizedlist>
...@@ -508,7 +508,7 @@ global locale" (emphasis Paolo), that is: ...@@ -508,7 +508,7 @@ global locale" (emphasis Paolo), that is:
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect2> </section>
<bibliography id="locales.locale.biblio"> <bibliography id="locales.locale.biblio">
<title>Bibliography</title> <title>Bibliography</title>
...@@ -634,4 +634,4 @@ global locale" (emphasis Paolo), that is: ...@@ -634,4 +634,4 @@ global locale" (emphasis Paolo), that is:
</bibliography> </bibliography>
</sect1> </section>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.localization" xreflabel="Localization"> <chapter id="std.localization" xreflabel="Localization">
<?dbhtml filename="localization.html"?> <?dbhtml filename="localization.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,45 +15,45 @@ ...@@ -15,45 +15,45 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Localization Localization
<indexterm><primary>Localization</primary></indexterm> <indexterm><primary>Localization</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Locale --> <!-- Section 01 : Locale -->
<chapter id="manual.localization.locales" xreflabel="Locales"> <section id="std.localization.locales" xreflabel="Locales">
<?dbhtml filename="locales.html"?> <?dbhtml filename="locales.html"?>
<title>Locales</title> <title>Locales</title>
<!-- Section 01 : locale --> <!-- Section 01 : locale -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="locale.xml"> parse="xml" href="locale.xml">
</xi:include> </xi:include>
</chapter> </section>
<!-- Chapter 02 : Facet --> <!-- Section 02 : Facet -->
<chapter id="manual.localization.facet" xreflabel="Facets"> <section id="std.localization.facet" xreflabel="Facets">
<?dbhtml filename="facets.html"?> <?dbhtml filename="facets.html"?>
<title>Facets aka Categories</title> <title>Facets</title>
<!-- Section 01 : ctype --> <!-- Section 01 : ctype -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="ctype.xml"> parse="xml" href="ctype.xml">
</xi:include> </xi:include>
<!-- Section 02 : codecvt --> <!-- Section 02 : codecvt -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="codecvt.xml"> parse="xml" href="codecvt.xml">
</xi:include> </xi:include>
<!-- Section 03 : messages --> <!-- Section 03 : messages -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="messages.xml"> parse="xml" href="messages.xml">
</xi:include> </xi:include>
</chapter> </section>
<!-- Chapter 03 : Interacting with C --> <!-- Section 03 : Interacting with C -->
</part> </chapter>
<sect1 id="manual.localization.facet.messages" xreflabel="Messages"> <section id="manual.localization.facet.messages" xreflabel="Messages">
<?dbhtml filename="messages.html"?> <?dbhtml filename="messages.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
messages messages
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>messages</title> <title>messages</title>
...@@ -20,7 +20,7 @@ equivalent to Java's java.text.MessageFormat .using either GNU gettext ...@@ -20,7 +20,7 @@ equivalent to Java's java.text.MessageFormat .using either GNU gettext
or IEEE 1003.1-200 functions. or IEEE 1003.1-200 functions.
</para> </para>
<sect2 id="facet.messages.req"> <section id="facet.messages.req">
<title>Requirements</title> <title>Requirements</title>
<para> <para>
...@@ -106,9 +106,9 @@ be found, returns dfault. ...@@ -106,9 +106,9 @@ be found, returns dfault.
</blockquote> </blockquote>
</sect2> </section>
<sect2 id="facet.messages.design"> <section id="facet.messages.design">
<title>Design</title> <title>Design</title>
<para> <para>
...@@ -155,12 +155,12 @@ to be written in English, so translations are always from "en_US" to ...@@ -155,12 +155,12 @@ to be written in English, so translations are always from "en_US" to
other, explicitly named locales. other, explicitly named locales.
</para> </para>
</sect2> </section>
<sect2 id="facet.messages.impl"> <section id="facet.messages.impl">
<title>Implementation</title> <title>Implementation</title>
<sect3 id="messages.impl.models"> <section id="messages.impl.models">
<title>Models</title> <title>Models</title>
<para> <para>
This is a relatively simple class, on the face of it. The standard This is a relatively simple class, on the face of it. The standard
...@@ -226,9 +226,9 @@ message catalog. This simplifies calling conventions for the gnu ...@@ -226,9 +226,9 @@ message catalog. This simplifies calling conventions for the gnu
model. model.
</para> </para>
</sect3> </section>
<sect3 id="messages.impl.gnu"> <section id="messages.impl.gnu">
<title>The GNU Model</title> <title>The GNU Model</title>
<para> <para>
...@@ -318,10 +318,10 @@ model. ...@@ -318,10 +318,10 @@ model.
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect3> </section>
</sect2> </section>
<sect2 id="facet.messages.use"> <section id="facet.messages.use">
<title>Use</title> <title>Use</title>
<para> <para>
A simple example using the GNU model of message conversion. A simple example using the GNU model of message conversion.
...@@ -349,9 +349,9 @@ void test01() ...@@ -349,9 +349,9 @@ void test01()
} }
</programlisting> </programlisting>
</sect2> </section>
<sect2 id="facet.messages.future"> <section id="facet.messages.future">
<title>Future</title> <title>Future</title>
<itemizedlist> <itemizedlist>
...@@ -436,7 +436,7 @@ void test01() ...@@ -436,7 +436,7 @@ void test01()
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect2> </section>
<bibliography id="facet.messages.biblio"> <bibliography id="facet.messages.biblio">
<title>Bibliography</title> <title>Bibliography</title>
...@@ -585,4 +585,4 @@ Library and Tools. ...@@ -585,4 +585,4 @@ Library and Tools.
</bibliography> </bibliography>
</sect1> </section>
<sect1 id="manual.ext.allocator.mt" xreflabel="mt allocator"> <sect1 id="manual.ext.allocator.mt" xreflabel="mt allocator">
<?dbhtml filename="mt_allocator.html"?> <?dbhtml filename="mt_allocator.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<sect2 id="allocator.mt.intro"> <sect2 id="allocator.mt.intro">
<title>Intro</title> <title>Intro</title>
<para> <para>
The mt allocator [hereinafter referred to simply as "the allocator"] The mt allocator [hereinafter referred to simply as "the allocator"]
is a fixed size (power of two) allocator that was initially is a fixed size (power of two) allocator that was initially
developed specifically to suit the needs of multi threaded developed specifically to suit the needs of multi threaded
...@@ -57,7 +57,7 @@ individual pools, and a class inheriting from the policy class that is ...@@ -57,7 +57,7 @@ individual pools, and a class inheriting from the policy class that is
the actual allocator. the actual allocator.
</para> </para>
<para>The datum describing pools characteristics is <para>The datum describing pools characteristics is
</para> </para>
<programlisting> <programlisting>
template&lt;bool _Thread&gt; template&lt;bool _Thread&gt;
...@@ -151,9 +151,9 @@ int main() ...@@ -151,9 +151,9 @@ int main()
tune_type t_single(16, 5120, 32, 5120, 1, 10, false); tune_type t_single(16, 5120, 32, 5120, 1, 10, false);
tune_type t; tune_type t;
t = allocator_type::_M_get_options(); t = allocator_type::_M_get_options();
allocator_type::_M_set_options(t_opt); allocator_type::_M_set_options(t_opt);
t = allocator_type::_M_get_options(); t = allocator_type::_M_get_options();
allocator_type a; allocator_type a;
allocator_type::pointer p1 = a.allocate(128); allocator_type::pointer p1 = a.allocate(128);
...@@ -193,18 +193,18 @@ The _S_initialize() function: ...@@ -193,18 +193,18 @@ The _S_initialize() function:
</para> </para>
<para> <para>
- If the GLIBCXX_FORCE_NEW environment variable is not set, both ST and MT - If the GLIBCXX_FORCE_NEW environment variable is not set, both ST and MT
applications will: applications will:
- Calculate the number of bins needed. A bin is a specific power of two size - Calculate the number of bins needed. A bin is a specific power of two size
of bytes. I.e., by default the allocator will deal with requests of up to of bytes. I.e., by default the allocator will deal with requests of up to
128 bytes (or whatever the value of _S_max_bytes is when _S_init() is 128 bytes (or whatever the value of _S_max_bytes is when _S_init() is
called). This means that there will be bins of the following sizes called). This means that there will be bins of the following sizes
(in bytes): 1, 2, 4, 8, 16, 32, 64, 128. (in bytes): 1, 2, 4, 8, 16, 32, 64, 128.
- Create the _S_binmap array. All requests are rounded up to the next - Create the _S_binmap array. All requests are rounded up to the next
"large enough" bin. I.e., a request for 29 bytes will cause a block from "large enough" bin. I.e., a request for 29 bytes will cause a block from
the "32 byte bin" to be returned to the application. The purpose of the "32 byte bin" to be returned to the application. The purpose of
_S_binmap is to speed up the process of finding out which bin to use. _S_binmap is to speed up the process of finding out which bin to use.
I.e., the value of _S_binmap[ 29 ] is initialized to 5 (bin 5 = 32 bytes). I.e., the value of _S_binmap[ 29 ] is initialized to 5 (bin 5 = 32 bytes).
</para> </para>
<para> <para>
...@@ -213,37 +213,37 @@ The _S_initialize() function: ...@@ -213,37 +213,37 @@ The _S_initialize() function:
earlier. I.e., if _S_max_bytes = 128 there will be 8 entries. earlier. I.e., if _S_max_bytes = 128 there will be 8 entries.
Each bin_record is then initialized: Each bin_record is then initialized:
- bin_record-&gt;first = An array of pointers to block_records. There will be - bin_record-&gt;first = An array of pointers to block_records. There will be
as many block_records pointers as there are maximum number of threads as many block_records pointers as there are maximum number of threads
(in a ST application there is only 1 thread, in a MT application there (in a ST application there is only 1 thread, in a MT application there
are _S_max_threads). are _S_max_threads).
This holds the pointer to the first free block for each thread in this This holds the pointer to the first free block for each thread in this
bin. I.e., if we would like to know where the first free block of size 32 bin. I.e., if we would like to know where the first free block of size 32
for thread number 3 is we would look this up by: _S_bin[ 5 ].first[ 3 ] for thread number 3 is we would look this up by: _S_bin[ 5 ].first[ 3 ]
The above created block_record pointers members are now initialized to The above created block_record pointers members are now initialized to
their initial values. I.e. _S_bin[ n ].first[ n ] = NULL; their initial values. I.e. _S_bin[ n ].first[ n ] = NULL;
</para> </para>
<para> <para>
- Additionally a MT application will: - Additionally a MT application will:
- Create a list of free thread id's. The pointer to the first entry - Create a list of free thread id's. The pointer to the first entry
is stored in _S_thread_freelist_first. The reason for this approach is is stored in _S_thread_freelist_first. The reason for this approach is
that the __gthread_self() call will not return a value that corresponds to that the __gthread_self() call will not return a value that corresponds to
the maximum number of threads allowed but rather a process id number or the maximum number of threads allowed but rather a process id number or
something else. So what we do is that we create a list of thread_records. something else. So what we do is that we create a list of thread_records.
This list is _S_max_threads long and each entry holds a size_t thread_id This list is _S_max_threads long and each entry holds a size_t thread_id
which is initialized to 1, 2, 3, 4, 5 and so on up to _S_max_threads. which is initialized to 1, 2, 3, 4, 5 and so on up to _S_max_threads.
Each time a thread calls allocate() or deallocate() we call Each time a thread calls allocate() or deallocate() we call
_S_get_thread_id() which looks at the value of _S_thread_key which is a _S_get_thread_id() which looks at the value of _S_thread_key which is a
thread local storage pointer. If this is NULL we know that this is a newly thread local storage pointer. If this is NULL we know that this is a newly
created thread and we pop the first entry from this list and saves the created thread and we pop the first entry from this list and saves the
pointer to this record in the _S_thread_key variable. The next time pointer to this record in the _S_thread_key variable. The next time
we will get the pointer to the thread_record back and we use the we will get the pointer to the thread_record back and we use the
thread_record-&gt;thread_id as identification. I.e., the first thread that thread_record-&gt;thread_id as identification. I.e., the first thread that
calls allocate will get the first record in this list and thus be thread calls allocate will get the first record in this list and thus be thread
number 1 and will then find the pointer to its first free 32 byte block number 1 and will then find the pointer to its first free 32 byte block
in _S_bin[ 5 ].first[ 1 ] in _S_bin[ 5 ].first[ 1 ]
When we create the _S_thread_key we also define a destructor When we create the _S_thread_key we also define a destructor
(_S_thread_key_destr) which means that when the thread dies, this (_S_thread_key_destr) which means that when the thread dies, this
thread_record is returned to the front of this list and the thread id thread_record is returned to the front of this list and the thread id
can then be reused if a new thread is created. can then be reused if a new thread is created.
...@@ -262,7 +262,7 @@ The _S_initialize() function: ...@@ -262,7 +262,7 @@ The _S_initialize() function:
has made 678 requests (and no deallocations...) of 32-byte blocks this has made 678 requests (and no deallocations...) of 32-byte blocks this
counter will read 678. counter will read 678.
The above created arrays are now initialized with their initial values. The above created arrays are now initialized with their initial values.
I.e. _S_bin[ n ].free[ n ] = 0; I.e. _S_bin[ n ].free[ n ] = 0;
</para> </para>
<para> <para>
...@@ -368,7 +368,7 @@ This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes): ...@@ -368,7 +368,7 @@ This is the first two blocks in freelist for thread id 3 in bin 3 (8 bytes):
<para> <para>
With this in mind we simplify things a bit for a while and say that there is With this in mind we simplify things a bit for a while and say that there is
only one thread (a ST application). In this case all operations are made to only one thread (a ST application). In this case all operations are made to
what is referred to as the global pool - thread id 0 (No thread may be what is referred to as the global pool - thread id 0 (No thread may be
assigned this id since they span from 1 to _S_max_threads in a MT application). assigned this id since they span from 1 to _S_max_threads in a MT application).
</para> </para>
...@@ -377,28 +377,28 @@ When the application requests memory (calling allocate()) we first look at the ...@@ -377,28 +377,28 @@ When the application requests memory (calling allocate()) we first look at the
requested size and if this is &gt; _S_max_bytes we call new() directly and return. requested size and if this is &gt; _S_max_bytes we call new() directly and return.
</para> </para>
<para> <para>
If the requested size is within limits we start by finding out from which If the requested size is within limits we start by finding out from which
bin we should serve this request by looking in _S_binmap. bin we should serve this request by looking in _S_binmap.
</para> </para>
<para> <para>
A quick look at _S_bin[ bin ].first[ 0 ] tells us if there are any blocks of A quick look at _S_bin[ bin ].first[ 0 ] tells us if there are any blocks of
this size on the freelist (0). If this is not NULL - fine, just remove the this size on the freelist (0). If this is not NULL - fine, just remove the
block that _S_bin[ bin ].first[ 0 ] points to from the list, block that _S_bin[ bin ].first[ 0 ] points to from the list,
update _S_bin[ bin ].first[ 0 ] and return a pointer to that blocks data. update _S_bin[ bin ].first[ 0 ] and return a pointer to that blocks data.
</para> </para>
<para> <para>
If the freelist is empty (the pointer is NULL) we must get memory from the If the freelist is empty (the pointer is NULL) we must get memory from the
system and build us a freelist within this memory. All requests for new memory system and build us a freelist within this memory. All requests for new memory
is made in chunks of _S_chunk_size. Knowing the size of a block_record and is made in chunks of _S_chunk_size. Knowing the size of a block_record and
the bytes that this bin stores we then calculate how many blocks we can create the bytes that this bin stores we then calculate how many blocks we can create
within this chunk, build the list, remove the first block, update the pointer within this chunk, build the list, remove the first block, update the pointer
(_S_bin[ bin ].first[ 0 ]) and return a pointer to that blocks data. (_S_bin[ bin ].first[ 0 ]) and return a pointer to that blocks data.
</para> </para>
<para> <para>
Deallocation is equally simple; the pointer is casted back to a block_record Deallocation is equally simple; the pointer is casted back to a block_record
pointer, lookup which bin to use based on the size, add the block to the front pointer, lookup which bin to use based on the size, add the block to the front
of the global freelist and update the pointer as needed of the global freelist and update the pointer as needed
(_S_bin[ bin ].first[ 0 ]). (_S_bin[ bin ].first[ 0 ]).
</para> </para>
...@@ -414,8 +414,8 @@ faster than maintaining a set of "last pointers" as well. ...@@ -414,8 +414,8 @@ faster than maintaining a set of "last pointers" as well.
<title>Multiple Thread Example</title> <title>Multiple Thread Example</title>
<para> <para>
In the ST example we never used the thread_id variable present in each block. In the ST example we never used the thread_id variable present in each block.
Let's start by explaining the purpose of this in a MT application. Let's start by explaining the purpose of this in a MT application.
</para> </para>
<para> <para>
...@@ -454,12 +454,12 @@ directly and return. ...@@ -454,12 +454,12 @@ directly and return.
</para> </para>
<para> <para>
If the requested size is within limits we start by finding out from which If the requested size is within limits we start by finding out from which
bin we should serve this request by looking in _S_binmap. bin we should serve this request by looking in _S_binmap.
</para> </para>
<para> <para>
A call to _S_get_thread_id() returns the thread id for the calling thread A call to _S_get_thread_id() returns the thread id for the calling thread
(and if no value has been set in _S_thread_key, a new id is assigned and (and if no value has been set in _S_thread_key, a new id is assigned and
returned). returned).
</para> </para>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.numerics" xreflabel="Numerics"> <chapter id="std.numerics" xreflabel="Numerics">
<?dbhtml filename="numerics.html"?> <?dbhtml filename="numerics.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Numerics Numerics
<indexterm><primary>Numerics</primary></indexterm> <indexterm><primary>Numerics</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Complex --> <!-- Sect1 01 : Complex -->
<chapter id="manual.numerics.complex" xreflabel="complex"> <sect1 id="std.numerics.complex" xreflabel="complex">
<?dbhtml filename="complex.html"?> <?dbhtml filename="complex.html"?>
<title>Complex</title> <title>Complex</title>
<para> <para>
</para> </para>
<sect1 id="numerics.complex.processing" xreflabel="complex Processing"> <sect2 id="numerics.complex.processing" xreflabel="complex Processing">
<title>complex Processing</title> <title>complex Processing</title>
<para> <para>
</para> </para>
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
<code>(u)</code>, and <code>(u,v)</code>. <code>(u)</code>, and <code>(u,v)</code>.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 02 : Generalized Operations --> <!-- Sect1 02 : Generalized Operations -->
<chapter id="manual.numerics.generalized_ops" xreflabel="Generalized Ops"> <sect1 id="std.numerics.generalized_ops" xreflabel="Generalized Ops">
<?dbhtml filename="generalized_numeric_operations.html"?> <?dbhtml filename="generalized_numeric_operations.html"?>
<title>Generalized Operations</title> <title>Generalized Operations</title>
<para> <para>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<itemizedlist> <itemizedlist>
<listitem><para><code>accumulate</code></para></listitem> <listitem><para><code>accumulate</code></para></listitem>
<listitem><para><code>inner_product</code></para></listitem> <listitem><para><code>inner_product</code></para></listitem>
<listitem><para><code>partial_sum</code></para></listitem> <listitem><para><code>chapterial_sum</code></para></listitem>
<listitem><para><code>adjacent_difference</code></para></listitem> <listitem><para><code>adjacent_difference</code></para></listitem>
</itemizedlist> </itemizedlist>
<para>Here is a simple example of the two forms of <code>accumulate</code>. <para>Here is a simple example of the two forms of <code>accumulate</code>.
...@@ -93,14 +93,14 @@ ...@@ -93,14 +93,14 @@
<para>The other three functions have similar dual-signature forms. <para>The other three functions have similar dual-signature forms.
</para> </para>
</chapter> </sect1>
<!-- Chapter 03 : Interacting with C --> <!-- Sect1 03 : Interacting with C -->
<chapter id="manual.numerics.c" xreflabel="Interacting with C"> <sect1 id="std.numerics.c" xreflabel="Interacting with C">
<?dbhtml filename="numerics_and_c.html"?> <?dbhtml filename="numerics_and_c.html"?>
<title>Interacting with C</title> <title>Interacting with C</title>
<sect1 id="numerics.c.array" xreflabel="Numerics vs. Arrays"> <sect2 id="numerics.c.array" xreflabel="Numerics vs. Arrays">
<title>Numerics vs. Arrays</title> <title>Numerics vs. Arrays</title>
<para>One of the major reasons why FORTRAN can chew through numbers so well <para>One of the major reasons why FORTRAN can chew through numbers so well
...@@ -121,9 +121,9 @@ ...@@ -121,9 +121,9 @@
libraries before. libraries before.
</para> </para>
</sect1> </sect2>
<sect1 id="numerics.c.c99" xreflabel="C99"> <sect2 id="numerics.c.c99" xreflabel="C99">
<title>C99</title> <title>C99</title>
<para>In addition to the other topics on this page, we'll note here some <para>In addition to the other topics on this page, we'll note here some
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<code>wcstoll</code>. <code>wcstoll</code>.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
</part> </chapter>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<chapter id="manual.ext.parallel_mode" xreflabel="Parallel Mode"> <chapter id="manual.ext.parallel_mode" xreflabel="Parallel Mode">
<?dbhtml filename="parallel_mode.html"?> <?dbhtml filename="parallel_mode.html"?>
<chapterinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -115,7 +115,7 @@ It might work with other compilers, though.</para> ...@@ -115,7 +115,7 @@ It might work with other compilers, though.</para>
flag <literal>-fopenmp</literal>. This will link flag <literal>-fopenmp</literal>. This will link
in <code>libgomp</code>, the GNU in <code>libgomp</code>, the GNU
OpenMP <ulink url="http://gcc.gnu.org/onlinedocs/libgomp">implementation</ulink>, OpenMP <ulink url="http://gcc.gnu.org/onlinedocs/libgomp">implementation</ulink>,
whose presence is mandatory. whose presence is mandatory.
</para> </para>
<para> <para>
...@@ -635,7 +635,7 @@ For the following algorithms in general, we have ...@@ -635,7 +635,7 @@ For the following algorithms in general, we have
<code>__gnu_parallel::parallel_tag</code> and <code>__gnu_parallel::parallel_tag</code> and
<code>__gnu_parallel::default_parallel_tag</code>, in addition to <code>__gnu_parallel::default_parallel_tag</code>, in addition to
<code>__gnu_parallel::sequential_tag</code>. <code>__gnu_parallel::sequential_tag</code>.
<code>__gnu_parallel::default_parallel_tag</code> chooses the default <code>__gnu_parallel::default_parallel_tag</code> chooses the default
algorithm at compiletime, as does omitting the tag. algorithm at compiletime, as does omitting the tag.
<code>__gnu_parallel::parallel_tag</code> postpones the decision to runtime <code>__gnu_parallel::parallel_tag</code> postpones the decision to runtime
(see next section). (see next section).
...@@ -654,7 +654,7 @@ Exact and sampling are the two available splitting strategies. ...@@ -654,7 +654,7 @@ Exact and sampling are the two available splitting strategies.
For the <code>sort</code> and <code>stable_sort</code> algorithms, there are For the <code>sort</code> and <code>stable_sort</code> algorithms, there are
several additional choices, namely several additional choices, namely
<code>__gnu_parallel::multiway_mergesort_tag</code>, <code>__gnu_parallel::multiway_mergesort_tag</code>,
<code>__gnu_parallel::multiway_mergesort_exact_tag</code>, <code>__gnu_parallel::multiway_mergesort_exact_tag</code>,
<code>__gnu_parallel::multiway_mergesort_sampling_tag</code>, <code>__gnu_parallel::multiway_mergesort_sampling_tag</code>,
<code>__gnu_parallel::quicksort_tag</code>, and <code>__gnu_parallel::quicksort_tag</code>, and
<code>__gnu_parallel::balanced_quicksort_tag</code>. <code>__gnu_parallel::balanced_quicksort_tag</code>.
...@@ -767,7 +767,7 @@ explicitly sequential: ...@@ -767,7 +767,7 @@ explicitly sequential:
</para> </para>
<para> Two namespaces contain the parallel mode: <para> Two namespaces contain the parallel mode:
<code>std::__parallel</code> and <code>__gnu_parallel</code>. <code>std::__parallel</code> and <code>__gnu_parallel</code>.
</para> </para>
<para> Parallel implementations of standard components, including <para> Parallel implementations of standard components, including
...@@ -794,12 +794,12 @@ the generated source documentation. ...@@ -794,12 +794,12 @@ the generated source documentation.
<sect1 id="manual.ext.parallel_mode.test" xreflabel="Testing"> <sect1 id="manual.ext.parallel_mode.test" xreflabel="Testing">
<title>Testing</title> <title>Testing</title>
<para> <para>
Both the normal conformance and regression tests and the Both the normal conformance and regression tests and the
supplemental performance tests work. supplemental performance tests work.
</para> </para>
<para> <para>
To run the conformance and regression tests with the parallel mode To run the conformance and regression tests with the parallel mode
active, active,
</para> </para>
...@@ -807,13 +807,13 @@ the generated source documentation. ...@@ -807,13 +807,13 @@ the generated source documentation.
<screen> <screen>
<userinput>make check-parallel</userinput> <userinput>make check-parallel</userinput>
</screen> </screen>
<para> <para>
The log and summary files for conformance testing are in the The log and summary files for conformance testing are in the
<filename class="directory">testsuite/parallel</filename> directory. <filename class="directory">testsuite/parallel</filename> directory.
</para> </para>
<para> <para>
To run the performance tests with the parallel mode active, To run the performance tests with the parallel mode active,
</para> </para>
...@@ -859,7 +859,7 @@ the generated source documentation. ...@@ -859,7 +859,7 @@ the generated source documentation.
Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS)
</publishername> </publishername>
</publisher> </publisher>
</biblioentry> </biblioentry>
<biblioentry> <biblioentry>
<title> <title>
...@@ -889,7 +889,7 @@ the generated source documentation. ...@@ -889,7 +889,7 @@ the generated source documentation.
Euro-Par 2007: Parallel Processing. (LNCS 4641) Euro-Par 2007: Parallel Processing. (LNCS 4641)
</publishername> </publishername>
</publisher> </publisher>
</biblioentry> </biblioentry>
</bibliography> </bibliography>
......
<sect1 id="manual.intro.setup.prereq" xreflabel="Prerequisites"> <sect1 id="manual.intro.setup.prereq" xreflabel="Prerequisites">
<?dbhtml filename="prerequisites.html"?> <?dbhtml filename="prerequisites.html"?>
<sect1info> <sect1info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Because libstdc++ is part of GCC, the primary source for Because libstdc++ is part of GCC, the primary source for
installation instructions is installation instructions is
<ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>. <ulink url="http://gcc.gnu.org/install/">the GCC install page</ulink>.
In particular, list of prerequisite software needed to build the library In particular, list of prerequisite software needed to build the library
<ulink url="http://gcc.gnu.org/install/prerequisites.html"> <ulink url="http://gcc.gnu.org/install/prerequisites.html">
starts with those requirements.</ulink> The same pages also list starts with those requirements.</ulink> The same pages also list
the tools you will need if you wish to modify the source. the tools you will need if you wish to modify the source.
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
</para> </para>
<para> <para>
Finally, a few system-specific requirements: Finally, a few system-specific requirements:
</para> </para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>linux</term> <term>linux</term>
<listitem> <listitem>
<para> <para>
If gcc 3.1.0 or later on is being used on linux, an attempt If gcc 3.1.0 or later on is being used on linux, an attempt
...@@ -109,50 +109,50 @@ zh_TW BIG5 ...@@ -109,50 +109,50 @@ zh_TW BIG5
</para> </para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>install all locales</para> <para>install all locales</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>with RedHat Linux: <para>with RedHat Linux:
</para> </para>
<para> <code> export LC_ALL=C </code> <para> <code> export LC_ALL=C </code>
</para> </para>
<para> <code> rpm -e glibc-common --nodeps </code> <para> <code> rpm -e glibc-common --nodeps </code>
</para> </para>
<para> <para>
<code> rpm -i --define "_install_langs all" <code> rpm -i --define "_install_langs all"
glibc-common-2.2.5-34.i386.rpm glibc-common-2.2.5-34.i386.rpm
</code> </code>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Instructions for other operating systems solicited. Instructions for other operating systems solicited.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
<listitem> <listitem>
<para>install just the necessary locales</para> <para>install just the necessary locales</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>with Debian Linux:</para> <para>with Debian Linux:</para>
<para> Add the above list, as shown, to the file <para> Add the above list, as shown, to the file
<code>/etc/locale.gen</code> </para> <code>/etc/locale.gen</code> </para>
<para> run <code>/usr/sbin/locale-gen</code> </para> <para> run <code>/usr/sbin/locale-gen</code> </para>
</listitem> </listitem>
<listitem> <listitem>
<para>on most Unix-like operating systems:</para> <para>on most Unix-like operating systems:</para>
<para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para> <para><code> localedef -i de_DE -f ISO-8859-1 de_DE </code></para>
<para>(repeat for each entry in the above list) </para> <para>(repeat for each entry in the above list) </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Instructions for other operating systems solicited. Instructions for other operating systems solicited.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<chapter id="manual.ext.profile_mode" xreflabel="Profile Mode"> <chapter id="manual.ext.profile_mode" xreflabel="Profile Mode">
<?dbhtml filename="profile_mode.html"?> <?dbhtml filename="profile_mode.html"?>
<chapterinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
calls to an instrumentation library to record the internal state of calls to an instrumentation library to record the internal state of
various components at interesting entry/exit points to/from the standard various components at interesting entry/exit points to/from the standard
library. Process trace, recognize suboptimal patterns, give advice. library. Process trace, recognize suboptimal patterns, give advice.
For details, see For details, see
<ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at <ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at
CGO 2009</ulink>. CGO 2009</ulink>.
</para> </para>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<emphasis>Strengths: </emphasis> <emphasis>Strengths: </emphasis>
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
Unintrusive solution. The application code does not require any Unintrusive solution. The application code does not require any
modification. modification.
</para></listitem> </para></listitem>
<listitem><para> The advice is call context sensitive, thus capable of <listitem><para> The advice is call context sensitive, thus capable of
...@@ -178,7 +178,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -178,7 +178,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
<listitem><para>_GLIBCXX_PROFILE_MAX_WARN_COUNT: set it to the maximum <listitem><para>_GLIBCXX_PROFILE_MAX_WARN_COUNT: set it to the maximum
number of warnings desired. The default value is 10.</para></listitem> number of warnings desired. The default value is 10.</para></listitem>
<listitem><para> <listitem><para>
<code>_GLIBCXX_PROFILE_MAX_STACK_DEPTH</code>: if set to 0, <code>_GLIBCXX_PROFILE_MAX_STACK_DEPTH</code>: if set to 0,
the advice will the advice will
be collected and reported for the program as a whole, and not for each be collected and reported for the program as a whole, and not for each
call context. call context.
...@@ -196,7 +196,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -196,7 +196,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
<code>_GLIBCXX_PROFILE_NO_THREADS</code>: <code>_GLIBCXX_PROFILE_NO_THREADS</code>:
Make the library not use threads. If thread local storage (TLS) is not Make the library not use threads. If thread local storage (TLS) is not
available, you will get a preprocessor error asking you to set available, you will get a preprocessor error asking you to set
-D_GLIBCXX_PROFILE_NO_THREADS if your program is single-threaded. -D_GLIBCXX_PROFILE_NO_THREADS if your program is single-threaded.
Multithreaded execution without TLS is not supported. Multithreaded execution without TLS is not supported.
...@@ -258,7 +258,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -258,7 +258,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
<para> <para>
</para> </para>
<sect2 id="manual.ext.profile_mode.design.wrapper" <sect2 id="manual.ext.profile_mode.design.wrapper"
xreflabel="Wrapper"> xreflabel="Wrapper">
<title>Wrapper Model</title> <title>Wrapper Model</title>
<para> <para>
...@@ -267,13 +267,13 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -267,13 +267,13 @@ vector-size: improvement = 3: call stack = 0x804842c ...
we use the same wrapper model as the debug mode. we use the same wrapper model as the debug mode.
We subclass entities from the release version. Wherever We subclass entities from the release version. Wherever
<code>_GLIBCXX_PROFILE</code> is defined, the release namespace is <code>_GLIBCXX_PROFILE</code> is defined, the release namespace is
<code>std::__norm</code>, whereas the profile namespace is <code>std::__norm</code>, whereas the profile namespace is
<code>std::__profile</code>. Using plain <code>std</code> translates <code>std::__profile</code>. Using plain <code>std</code> translates
into <code>std::__profile</code>. into <code>std::__profile</code>.
</para> </para>
<para> <para>
Whenever possible, we try to wrap at the public interface level, e.g., Whenever possible, we try to wrap at the public interface level, e.g.,
in <code>unordered_set</code> rather than in <code>hashtable</code>, in <code>unordered_set</code> rather than in <code>hashtable</code>,
in order not to depend on implementation. in order not to depend on implementation.
</para> </para>
<para> <para>
...@@ -288,20 +288,20 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -288,20 +288,20 @@ vector-size: improvement = 3: call stack = 0x804842c ...
</sect2> </sect2>
<sect2 id="manual.ext.profile_mode.design.instrumentation" <sect2 id="manual.ext.profile_mode.design.instrumentation"
xreflabel="Instrumentation"> xreflabel="Instrumentation">
<title>Instrumentation</title> <title>Instrumentation</title>
<para> <para>
Instead of instrumenting every public entry and exit point, Instead of instrumenting every public entry and exit point,
we chose to add instrumentation on demand, as needed we chose to add instrumentation on demand, as needed
by individual diagnostics. by individual diagnostics.
The main reason is that some diagnostics require us to extract bits of The main reason is that some diagnostics require us to extract bits of
internal state that are particular only to that diagnostic. internal state that are particular only to that diagnostic.
We plan to formalize this later, after we learn more about the requirements We plan to formalize this later, after we learn more about the requirements
of several diagnostics. of several diagnostics.
</para> </para>
<para> <para>
All the instrumentation points can be switched on and off using All the instrumentation points can be switched on and off using
<code>-D[_NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code> options. <code>-D[_NO]_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code> options.
With all the instrumentation calls off, there should be negligible With all the instrumentation calls off, there should be negligible
overhead over the release version. This property is needed to support overhead over the release version. This property is needed to support
...@@ -310,13 +310,13 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -310,13 +310,13 @@ vector-size: improvement = 3: call stack = 0x804842c ...
profiling overhead from polluting time measurements, and thus diagnostics. profiling overhead from polluting time measurements, and thus diagnostics.
</para> </para>
<para> <para>
All the instrumentation on/off compile time switches live in All the instrumentation on/off compile time switches live in
<code>include/profile/profiler.h</code>. <code>include/profile/profiler.h</code>.
</para> </para>
</sect2> </sect2>
<sect2 id="manual.ext.profile_mode.design.rtlib" <sect2 id="manual.ext.profile_mode.design.rtlib"
xreflabel="Run Time Behavior"> xreflabel="Run Time Behavior">
<title>Run Time Behavior</title> <title>Run Time Behavior</title>
<para> <para>
...@@ -338,7 +338,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -338,7 +338,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
</para> </para>
<para> <para>
For details, see For details, see
<ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at <ulink url="http://dx.doi.org/10.1109/CGO.2009.36">paper presented at
CGO 2009</ulink>. CGO 2009</ulink>.
</para> </para>
...@@ -364,7 +364,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -364,7 +364,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
xreflabel="Cost Model"> xreflabel="Cost Model">
<title>Cost Model</title> <title>Cost Model</title>
<para> <para>
While it is likely that cost models become complex as we get into While it is likely that cost models become complex as we get into
more sophisticated analysis, we will try to follow a simple set of rules more sophisticated analysis, we will try to follow a simple set of rules
at the beginning. at the beginning.
</para> </para>
...@@ -393,7 +393,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... ...@@ -393,7 +393,7 @@ vector-size: improvement = 3: call stack = 0x804842c ...
</para></listitem> </para></listitem>
<listitem><para><emphasis>Show stoppers:</emphasis> <listitem><para><emphasis>Show stoppers:</emphasis>
We may decide that the presence of an operation nullifies the advice. We may decide that the presence of an operation nullifies the advice.
For instance, when considering switching from <code>set</code> to For instance, when considering switching from <code>set</code> to
<code>unordered_set</code>, if we detect use of operator <code>++</code>, <code>unordered_set</code>, if we detect use of operator <code>++</code>,
we will simply not issue the advice, since this could signal that the use we will simply not issue the advice, since this could signal that the use
care require a sorted container.</para></listitem> care require a sorted container.</para></listitem>
...@@ -536,9 +536,9 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -536,9 +536,9 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
xreflabel="Using the Standard Library in the Runtime Library"> xreflabel="Using the Standard Library in the Runtime Library">
<title>Using the Standard Library in the Instrumentation Implementation</title> <title>Using the Standard Library in the Instrumentation Implementation</title>
<para> <para>
As much as we would like to avoid uses of libstdc++ within our As much as we would like to avoid uses of libstdc++ within our
instrumentation library, containers such as unordered_map are very instrumentation library, containers such as unordered_map are very
appealing. We plan to use them as long as they are named properly appealing. We plan to use them as long as they are named properly
to avoid ambiguity. to avoid ambiguity.
</para> </para>
</sect2> </sect2>
...@@ -573,7 +573,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -573,7 +573,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
The profiling library state is initialized at the first call to a profiling The profiling library state is initialized at the first call to a profiling
method. This allows us to record the construction of all global objects. method. This allows us to record the construction of all global objects.
However, we cannot do the same at destruction time. The trace is written However, we cannot do the same at destruction time. The trace is written
by a function registered by <code>atexit</code>, thus invoked by by a function registered by <code>atexit</code>, thus invoked by
<code>exit</code>. <code>exit</code>.
</para> </para>
</sect2> </sect2>
...@@ -590,21 +590,21 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -590,21 +590,21 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
<title>Big Picture</title> <title>Big Picture</title>
<para>The profile mode headers are included with <para>The profile mode headers are included with
<code>-D_GLIBCXX_PROFILE</code> through preprocessor directives in <code>-D_GLIBCXX_PROFILE</code> through preprocessor directives in
<code>include/std/*</code>. <code>include/std/*</code>.
</para> </para>
<para>Instrumented implementations are provided in <para>Instrumented implementations are provided in
<code>include/profile/*</code>. All instrumentation hooks are macros <code>include/profile/*</code>. All instrumentation hooks are macros
defined in <code>include/profile/profiler.h</code>. defined in <code>include/profile/profiler.h</code>.
</para> </para>
<para>All the implementation of the instrumentation hooks is in <para>All the implementation of the instrumentation hooks is in
<code>include/profile/impl/*</code>. Although all the code gets included, <code>include/profile/impl/*</code>. Although all the code gets included,
thus is publicly visible, only a small number of functions are called from thus is publicly visible, only a small number of functions are called from
outside this directory. All calls to hook implementations must be outside this directory. All calls to hook implementations must be
done through macros defined in <code>profiler.h</code>. The macro done through macros defined in <code>profiler.h</code>. The macro
must ensure (1) that the call is guarded against reentrance and must ensure (1) that the call is guarded against reentrance and
(2) that the call can be turned off at compile time using a (2) that the call can be turned off at compile time using a
<code>-D_GLIBCXX_PROFILE_...</code> compiler option. <code>-D_GLIBCXX_PROFILE_...</code> compiler option.
</para> </para>
...@@ -618,7 +618,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -618,7 +618,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
<para>Let's say the diagnostic name is "magic". <para>Let's say the diagnostic name is "magic".
</para> </para>
<para>If you need to instrument a header not already under <para>If you need to instrument a header not already under
<code>include/profile/*</code>, first edit the corresponding header <code>include/profile/*</code>, first edit the corresponding header
under <code>include/std/</code> and add a preprocessor directive such under <code>include/std/</code> and add a preprocessor directive such
as the one in <code>include/std/vector</code>: as the one in <code>include/std/vector</code>:
...@@ -670,7 +670,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -670,7 +670,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
This defines the content of a line in the stack table. This defines the content of a line in the stack table.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
Define class <code>__trace_magic: public __trace_base&lt;__magic_info, Define class <code>__trace_magic: public __trace_base&lt;__magic_info,
__magic_stack_info&gt;</code>. __magic_stack_info&gt;</code>.
It defines the content of the trace associated with this diagnostic. It defines the content of the trace associated with this diagnostic.
</para></listitem> </para></listitem>
...@@ -696,7 +696,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -696,7 +696,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
<code>-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>. <code>-D_GLIBCXX_PROFILE_&lt;diagnostic&gt;</code>.
Groups of related diagnostics can be turned on with a single switch. Groups of related diagnostics can be turned on with a single switch.
For instance, <code>-D_GLIBCXX_PROFILE_LOCALITY</code> is equivalent to For instance, <code>-D_GLIBCXX_PROFILE_LOCALITY</code> is equivalent to
<code>-D_GLIBCXX_PROFILE_SOFTWARE_PREFETCH <code>-D_GLIBCXX_PROFILE_SOFTWARE_PREFETCH
-D_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>. -D_GLIBCXX_PROFILE_RBTREE_LOCALITY</code>.
</para> </para>
...@@ -881,7 +881,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones. ...@@ -881,7 +881,7 @@ it helps the user focus on the key problems and ignore the uninteresting ones.
</tgroup> </tgroup>
</table> </table>
<sect2 id="manual.ext.profile_mode.analysis.template" <sect2 id="manual.ext.profile_mode.analysis.template"
xreflabel="Template"> xreflabel="Template">
<title>Diagnostic Template</title> <title>Diagnostic Template</title>
<itemizedlist> <itemizedlist>
...@@ -915,7 +915,7 @@ advice sample ...@@ -915,7 +915,7 @@ advice sample
</sect2> </sect2>
<sect2 id="manual.ext.profile_mode.analysis.containers" <sect2 id="manual.ext.profile_mode.analysis.containers"
xreflabel="Containers"> xreflabel="Containers">
<title>Containers</title> <title>Containers</title>
...@@ -924,14 +924,14 @@ advice sample ...@@ -924,14 +924,14 @@ advice sample
<code>_GLIBCXX_PROFILE_CONTAINERS</code>. <code>_GLIBCXX_PROFILE_CONTAINERS</code>.
</para> </para>
<sect3 id="manual.ext.profile_mode.analysis.hashtable_too_small" <sect3 id="manual.ext.profile_mode.analysis.hashtable_too_small"
xreflabel="Hashtable Too Small"> xreflabel="Hashtable Too Small">
<title>Hashtable Too Small</title> <title>Hashtable Too Small</title>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>. <code>_GLIBCXX_PROFILE_HASHTABLE_TOO_SMALL</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect hashtables with many <listitem><para><emphasis>Goal:</emphasis> Detect hashtables with many
rehash operations, small construction size and large destruction size. rehash operations, small construction size and large destruction size.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> Rehash is very expensive. <listitem><para><emphasis>Fundamentals:</emphasis> Rehash is very expensive.
...@@ -940,10 +940,10 @@ advice sample ...@@ -940,10 +940,10 @@ advice sample
<listitem><para><emphasis>Sample runtime reduction:</emphasis> 36%. <listitem><para><emphasis>Sample runtime reduction:</emphasis> 36%.
Code similar to example below. Code similar to example below.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Recommendation:</emphasis> <listitem><para><emphasis>Recommendation:</emphasis>
Set initial size to N at construction site S. Set initial size to N at construction site S.
</para></listitem> </para></listitem>
<listitem><para><emphasis>To instrument:</emphasis> <listitem><para><emphasis>To instrument:</emphasis>
<code>unordered_set, unordered_map</code> constructor, destructor, rehash. <code>unordered_set, unordered_map</code> constructor, destructor, rehash.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
...@@ -953,7 +953,7 @@ advice sample ...@@ -953,7 +953,7 @@ advice sample
Record the estimated rehash cost.</para></listitem> Record the estimated rehash cost.</para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Number of individual rehash operations * cost per rehash.</para></listitem> Number of individual rehash operations * cost per rehash.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 unordered_set&lt;int&gt; us; 1 unordered_set&lt;int&gt; us;
2 for (int k = 0; k &lt; 1000000; ++k) { 2 for (int k = 0; k &lt; 1000000; ++k) {
...@@ -967,7 +967,7 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1 ...@@ -967,7 +967,7 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1
</sect3> </sect3>
<sect3 id="manual.ext.profile_mode.analysis.hashtable_too_large" <sect3 id="manual.ext.profile_mode.analysis.hashtable_too_large"
xreflabel="Hashtable Too Large"> xreflabel="Hashtable Too Large">
<title>Hashtable Too Large</title> <title>Hashtable Too Large</title>
<itemizedlist> <itemizedlist>
...@@ -983,10 +983,10 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1 ...@@ -983,10 +983,10 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1
fewer cache and TLB misses.</para></listitem> fewer cache and TLB misses.</para></listitem>
<listitem><para><emphasis>Sample runtime reduction:</emphasis> unknown. <listitem><para><emphasis>Sample runtime reduction:</emphasis> unknown.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Recommendation:</emphasis> <listitem><para><emphasis>Recommendation:</emphasis>
Set initial size to N at construction site S. Set initial size to N at construction site S.
</para></listitem> </para></listitem>
<listitem><para><emphasis>To instrument:</emphasis> <listitem><para><emphasis>To instrument:</emphasis>
<code>unordered_set, unordered_map</code> constructor, destructor, rehash. <code>unordered_set, unordered_map</code> constructor, destructor, rehash.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
...@@ -996,7 +996,7 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1 ...@@ -996,7 +996,7 @@ foo.cc:1: advice: Changing initial unordered_set size from 10 to 1000000 saves 1
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Number of iteration operations + memory saved.</para></listitem> Number of iteration operations + memory saved.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 vector&lt;unordered_set&lt;int&gt;&gt; v(100000, unordered_set&lt;int&gt;(100)) ; 1 vector&lt;unordered_set&lt;int&gt;&gt; v(100000, unordered_set&lt;int&gt;(100)) ;
2 for (int k = 0; k &lt; 100000; ++k) { 2 for (int k = 0; k &lt; 100000; ++k) {
...@@ -1022,7 +1022,7 @@ bytes of memory and M iteration steps. ...@@ -1022,7 +1022,7 @@ bytes of memory and M iteration steps.
<listitem><para><emphasis>Goal:</emphasis> Detect hashtables with polarized <listitem><para><emphasis>Goal:</emphasis> Detect hashtables with polarized
distribution. distribution.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> A non-uniform <listitem><para><emphasis>Fundamentals:</emphasis> A non-uniform
distribution may lead to long chains, thus possibly increasing complexity distribution may lead to long chains, thus possibly increasing complexity
by a factor up to the number of elements. by a factor up to the number of elements.
</para></listitem> </para></listitem>
...@@ -1042,7 +1042,7 @@ bytes of memory and M iteration steps. ...@@ -1042,7 +1042,7 @@ bytes of memory and M iteration steps.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Total number of links traversed.</para></listitem> Total number of links traversed.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
class dumb_hash { class dumb_hash {
public: public:
...@@ -1059,14 +1059,14 @@ class dumb_hash { ...@@ -1059,14 +1059,14 @@ class dumb_hash {
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3 id="manual.ext.profile_mode.analysis.vector_too_small" <sect3 id="manual.ext.profile_mode.analysis.vector_too_small"
xreflabel="Vector Too Small"> xreflabel="Vector Too Small">
<title>Vector Too Small</title> <title>Vector Too Small</title>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>. <code>_GLIBCXX_PROFILE_VECTOR_TOO_SMALL</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis>Detect vectors with many <listitem><para><emphasis>Goal:</emphasis>Detect vectors with many
resize operations, small construction size and large destruction size.. resize operations, small construction size and large destruction size..
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis>Resizing can be expensive. <listitem><para><emphasis>Fundamentals:</emphasis>Resizing can be expensive.
...@@ -1081,26 +1081,26 @@ class dumb_hash { ...@@ -1081,26 +1081,26 @@ class dumb_hash {
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
For each dynamic instance of <code>vector</code>, For each dynamic instance of <code>vector</code>,
record initial size and call context of the constructor. record initial size and call context of the constructor.
Record size increase, if any, after each relevant operation such as Record size increase, if any, after each relevant operation such as
<code>push_back</code>. Record the estimated resize cost. <code>push_back</code>. Record the estimated resize cost.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Total number of words copied * time to copy a word.</para></listitem> Total number of words copied * time to copy a word.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 vector&lt;int&gt; v; 1 vector&lt;int&gt; v;
2 for (int k = 0; k &lt; 1000000; ++k) { 2 for (int k = 0; k &lt; 1000000; ++k) {
3 v.push_back(k); 3 v.push_back(k);
4 } 4 }
foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves foo.cc:1: advice: Changing initial vector size from 10 to 1000000 saves
copying 4000000 bytes and 20 memory allocations and deallocations. copying 4000000 bytes and 20 memory allocations and deallocations.
</programlisting> </programlisting>
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3 id="manual.ext.profile_mode.analysis.vector_too_large" <sect3 id="manual.ext.profile_mode.analysis.vector_too_large"
xreflabel="Vector Too Large"> xreflabel="Vector Too Large">
<title>Vector Too Large</title> <title>Vector Too Large</title>
<itemizedlist> <itemizedlist>
...@@ -1126,7 +1126,7 @@ copying 4000000 bytes and 20 memory allocations and deallocations. ...@@ -1126,7 +1126,7 @@ copying 4000000 bytes and 20 memory allocations and deallocations.
with its size at destruction time.</para></listitem> with its size at destruction time.</para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Total amount of memory saved.</para></listitem> Total amount of memory saved.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 vector&lt;vector&lt;int&gt;&gt; v(100000, vector&lt;int&gt;(100)) ; 1 vector&lt;vector&lt;int&gt;&gt; v(100000, vector&lt;int&gt;(100)) ;
2 for (int k = 0; k &lt; 100000; ++k) { 2 for (int k = 0; k &lt; 100000; ++k) {
...@@ -1142,14 +1142,14 @@ bytes of memory and may reduce the number of cache and TLB misses. ...@@ -1142,14 +1142,14 @@ bytes of memory and may reduce the number of cache and TLB misses.
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3 id="manual.ext.profile_mode.analysis.vector_to_hashtable" <sect3 id="manual.ext.profile_mode.analysis.vector_to_hashtable"
xreflabel="Vector to Hashtable"> xreflabel="Vector to Hashtable">
<title>Vector to Hashtable</title> <title>Vector to Hashtable</title>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>. <code>_GLIBCXX_PROFILE_VECTOR_TO_HASHTABLE</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect uses of <listitem><para><emphasis>Goal:</emphasis> Detect uses of
<code>vector</code> that can be substituted with <code>unordered_set</code> <code>vector</code> that can be substituted with <code>unordered_set</code>
to reduce execution time. to reduce execution time.
</para></listitem> </para></listitem>
...@@ -1159,7 +1159,7 @@ bytes of memory and may reduce the number of cache and TLB misses. ...@@ -1159,7 +1159,7 @@ bytes of memory and may reduce the number of cache and TLB misses.
<listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up <listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up
to container size. to container size.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Recommendation:</emphasis>Replace <listitem><para><emphasis>Recommendation:</emphasis>Replace
<code>vector</code> with <code>unordered_set</code> at site S. <code>vector</code> with <code>unordered_set</code> at site S.
</para></listitem> </para></listitem>
<listitem><para><emphasis>To instrument:</emphasis><code>vector</code> <listitem><para><emphasis>To instrument:</emphasis><code>vector</code>
...@@ -1167,7 +1167,7 @@ bytes of memory and may reduce the number of cache and TLB misses. ...@@ -1167,7 +1167,7 @@ bytes of memory and may reduce the number of cache and TLB misses.
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
For each dynamic instance of <code>vector</code>, For each dynamic instance of <code>vector</code>,
record call context of the constructor. Issue the advice only if the record call context of the constructor. Issue the advice only if the
only methods called on this <code>vector</code> are <code>push_back</code>, only methods called on this <code>vector</code> are <code>push_back</code>,
<code>insert</code> and <code>find</code>. <code>insert</code> and <code>find</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
...@@ -1189,14 +1189,14 @@ comparisons. ...@@ -1189,14 +1189,14 @@ comparisons.
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3 id="manual.ext.profile_mode.analysis.hashtable_to_vector" <sect3 id="manual.ext.profile_mode.analysis.hashtable_to_vector"
xreflabel="Hashtable to Vector"> xreflabel="Hashtable to Vector">
<title>Hashtable to Vector</title> <title>Hashtable to Vector</title>
<itemizedlist> <itemizedlist>
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>. <code>_GLIBCXX_PROFILE_HASHTABLE_TO_VECTOR</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect uses of <listitem><para><emphasis>Goal:</emphasis> Detect uses of
<code>unordered_set</code> that can be substituted with <code>vector</code> <code>unordered_set</code> that can be substituted with <code>vector</code>
to reduce execution time. to reduce execution time.
</para></listitem> </para></listitem>
...@@ -1204,7 +1204,7 @@ comparisons. ...@@ -1204,7 +1204,7 @@ comparisons.
Hashtable iterator is slower than vector iterator.</para></listitem> Hashtable iterator is slower than vector iterator.</para></listitem>
<listitem><para><emphasis>Sample runtime reduction:</emphasis>95%. <listitem><para><emphasis>Sample runtime reduction:</emphasis>95%.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Recommendation:</emphasis>Replace <listitem><para><emphasis>Recommendation:</emphasis>Replace
<code>unordered_set</code> with <code>vector</code> at site S. <code>unordered_set</code> with <code>vector</code> at site S.
</para></listitem> </para></listitem>
<listitem><para><emphasis>To instrument:</emphasis><code>unordered_set</code> <listitem><para><emphasis>To instrument:</emphasis><code>unordered_set</code>
...@@ -1212,7 +1212,7 @@ comparisons. ...@@ -1212,7 +1212,7 @@ comparisons.
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
For each dynamic instance of <code>unordered_set</code>, For each dynamic instance of <code>unordered_set</code>,
record call context of the constructor. Issue the advice only if the record call context of the constructor. Issue the advice only if the
number of <code>find</code>, <code>insert</code> and <code>[]</code> number of <code>find</code>, <code>insert</code> and <code>[]</code>
operations on this <code>unordered_set</code> are small relative to the operations on this <code>unordered_set</code> are small relative to the
number of elements, and methods <code>begin</code> or <code>end</code> number of elements, and methods <code>begin</code> or <code>end</code>
are invoked (suggesting iteration).</para></listitem> are invoked (suggesting iteration).</para></listitem>
...@@ -1241,12 +1241,12 @@ indirections and may achieve better data locality. ...@@ -1241,12 +1241,12 @@ indirections and may achieve better data locality.
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>. <code>_GLIBCXX_PROFILE_VECTOR_TO_LIST</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect cases where <listitem><para><emphasis>Goal:</emphasis> Detect cases where
<code>vector</code> could be substituted with <code>list</code> for <code>vector</code> could be substituted with <code>list</code> for
better performance. better performance.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> <listitem><para><emphasis>Fundamentals:</emphasis>
Inserting in the middle of a vector is expensive compared to inserting in a Inserting in the middle of a vector is expensive compared to inserting in a
list. list.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up to <listitem><para><emphasis>Sample runtime reduction:</emphasis>factor up to
...@@ -1266,14 +1266,14 @@ indirections and may achieve better data locality. ...@@ -1266,14 +1266,14 @@ indirections and may achieve better data locality.
(Sum(cost(vector::method)) - Sum(cost(list::method)), for (Sum(cost(vector::method)) - Sum(cost(list::method)), for
method in [push_back, insert, erase]) method in [push_back, insert, erase])
+ (Cost(iterate vector) - Cost(iterate list))</para></listitem> + (Cost(iterate vector) - Cost(iterate list))</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 vector&lt;int&gt; v; 1 vector&lt;int&gt; v;
2 for (int i = 0; i &lt; 10000; ++i) { 2 for (int i = 0; i &lt; 10000; ++i) {
3 v.insert(v.begin(), i); 3 v.insert(v.begin(), i);
4 } 4 }
foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000 foo.cc:1: advice: Changing "vector" to "list" will save about 5,000,000
operations. operations.
</programlisting> </programlisting>
</para></listitem> </para></listitem>
...@@ -1287,7 +1287,7 @@ operations. ...@@ -1287,7 +1287,7 @@ operations.
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>. <code>_GLIBCXX_PROFILE_LIST_TO_VECTOR</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect cases where <listitem><para><emphasis>Goal:</emphasis> Detect cases where
<code>list</code> could be substituted with <code>vector</code> for <code>list</code> could be substituted with <code>vector</code> for
better performance. better performance.
</para></listitem> </para></listitem>
...@@ -1307,7 +1307,7 @@ operations. ...@@ -1307,7 +1307,7 @@ operations.
(Sum(cost(vector::method)) - Sum(cost(list::method)), for (Sum(cost(vector::method)) - Sum(cost(list::method)), for
method in [push_back, insert, erase]) method in [push_back, insert, erase])
+ (Cost(iterate vector) - Cost(iterate list))</para></listitem> + (Cost(iterate vector) - Cost(iterate list))</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 list&lt;int&gt; l; 1 list&lt;int&gt; l;
... ...
...@@ -1330,7 +1330,7 @@ memory references. ...@@ -1330,7 +1330,7 @@ memory references.
<listitem><para><emphasis>Switch:</emphasis> <listitem><para><emphasis>Switch:</emphasis>
<code>_GLIBCXX_PROFILE_LIST_TO_SLIST</code>. <code>_GLIBCXX_PROFILE_LIST_TO_SLIST</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect cases where <listitem><para><emphasis>Goal:</emphasis> Detect cases where
<code>list</code> could be substituted with <code>forward_list</code> for <code>list</code> could be substituted with <code>forward_list</code> for
better performance. better performance.
</para></listitem> </para></listitem>
...@@ -1354,7 +1354,7 @@ memory references. ...@@ -1354,7 +1354,7 @@ memory references.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Always true.</para></listitem> Always true.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 list&lt;int&gt; l; 1 list&lt;int&gt; l;
... ...
...@@ -1380,7 +1380,7 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1380,7 +1380,7 @@ foo.cc:1: advice: Change "list" to "forward_list".
associative containers can be replaced with unordered ones. associative containers can be replaced with unordered ones.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> <listitem><para><emphasis>Fundamentals:</emphasis>
Insert and search are quicker in a hashtable than in Insert and search are quicker in a hashtable than in
a red-black tree.</para></listitem> a red-black tree.</para></listitem>
<listitem><para><emphasis>Sample runtime reduction:</emphasis>52%. <listitem><para><emphasis>Sample runtime reduction:</emphasis>52%.
</para></listitem> </para></listitem>
...@@ -1436,9 +1436,9 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1436,9 +1436,9 @@ foo.cc:1: advice: Change "list" to "forward_list".
Quick Sort for a particular call context. Quick Sort for a particular call context.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> <listitem><para><emphasis>Fundamentals:</emphasis>
See papers: See papers:
<ulink url="http://portal.acm.org/citation.cfm?doid=1065944.1065981"> <ulink url="http://portal.acm.org/citation.cfm?doid=1065944.1065981">
A framework for adaptive algorithm selection in STAPL</ulink> and A framework for adaptive algorithm selection in STAPL</ulink> and
<ulink url="http://ieeexplore.ieee.org/search/wrapper.jsp?arnumber=4228227"> <ulink url="http://ieeexplore.ieee.org/search/wrapper.jsp?arnumber=4228227">
Optimizing Sorting with Machine Learning Algorithms</ulink>. Optimizing Sorting with Machine Learning Algorithms</ulink>.
</para></listitem> </para></listitem>
...@@ -1450,7 +1450,7 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1450,7 +1450,7 @@ foo.cc:1: advice: Change "list" to "forward_list".
algorithm.</para></listitem> algorithm.</para></listitem>
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
Issue the advice if the cost model tells us that another sort algorithm Issue the advice if the cost model tells us that another sort algorithm
would do better on this input. Requires us to know what algorithm we would do better on this input. Requires us to know what algorithm we
are using in our sort implementation in release mode.</para></listitem> are using in our sort implementation in release mode.</para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Runtime(algo) for algo in [radix, quick, merge, ...]</para></listitem> Runtime(algo) for algo in [radix, quick, merge, ...]</para></listitem>
...@@ -1488,7 +1488,7 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1488,7 +1488,7 @@ foo.cc:1: advice: Change "list" to "forward_list".
miss in caches.</para></listitem> miss in caches.</para></listitem>
<listitem><para><emphasis>Sample runtime reduction:</emphasis>25%. <listitem><para><emphasis>Sample runtime reduction:</emphasis>25%.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Recommendation:</emphasis> Insert prefetch <listitem><para><emphasis>Recommendation:</emphasis> Insert prefetch
instruction.</para></listitem> instruction.</para></listitem>
<listitem><para><emphasis>To instrument:</emphasis> Vector iterator and <listitem><para><emphasis>To instrument:</emphasis> Vector iterator and
access operator []. access operator [].
...@@ -1496,7 +1496,7 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1496,7 +1496,7 @@ foo.cc:1: advice: Change "list" to "forward_list".
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
First, get cache line size and page size from system. First, get cache line size and page size from system.
Then record iterator dereference sequences for which the value is a pointer. Then record iterator dereference sequences for which the value is a pointer.
For each sequence within a container, issue a warning if successive pointer For each sequence within a container, issue a warning if successive pointer
addresses are not within cache lines and do not form a linear pattern addresses are not within cache lines and do not form a linear pattern
(otherwise they may be prefetched by hardware). (otherwise they may be prefetched by hardware).
If they also step across page boundaries, make the warning stronger. If they also step across page boundaries, make the warning stronger.
...@@ -1510,14 +1510,14 @@ foo.cc:1: advice: Change "list" to "forward_list". ...@@ -1510,14 +1510,14 @@ foo.cc:1: advice: Change "list" to "forward_list".
<para> <para>
This analysis is a little oversimplified. A better cost model could be This analysis is a little oversimplified. A better cost model could be
created by understanding the capability of the hardware prefetcher. created by understanding the capability of the hardware prefetcher.
This model could be trained automatically by running a set of synthetic This model could be trained automatically by running a set of synthetic
cases. cases.
</para> </para>
</listitem> </listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Total distance between pointer values of successive elements in vectors Total distance between pointer values of successive elements in vectors
of pointers.</para></listitem> of pointers.</para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 int zero = 0; 1 int zero = 0;
2 vector&lt;int*&gt; v(10000000, &amp;zero); 2 vector&lt;int*&gt; v(10000000, &amp;zero);
...@@ -1547,7 +1547,7 @@ foo.cc:7: advice: Insert prefetch instruction. ...@@ -1547,7 +1547,7 @@ foo.cc:7: advice: Insert prefetch instruction.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis>Allocation can be tuned <listitem><para><emphasis>Fundamentals:</emphasis>Allocation can be tuned
to a specific traversal pattern, to result in better data locality. to a specific traversal pattern, to result in better data locality.
See paper: See paper:
<ulink url="http://www.springerlink.com/content/8085744l00x72662/"> <ulink url="http://www.springerlink.com/content/8085744l00x72662/">
Custom Memory Allocation for Free</ulink>. Custom Memory Allocation for Free</ulink>.
</para></listitem> </para></listitem>
...@@ -1557,7 +1557,7 @@ foo.cc:7: advice: Insert prefetch instruction. ...@@ -1557,7 +1557,7 @@ foo.cc:7: advice: Insert prefetch instruction.
High scatter score N for container built at site S. High scatter score N for container built at site S.
Consider changing allocation sequence or choosing a structure conscious Consider changing allocation sequence or choosing a structure conscious
allocator.</para></listitem> allocator.</para></listitem>
<listitem><para><emphasis>To instrument:</emphasis> Methods of all <listitem><para><emphasis>To instrument:</emphasis> Methods of all
containers using linked structures.</para></listitem> containers using linked structures.</para></listitem>
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
First, get cache line size and page size from system. First, get cache line size and page size from system.
...@@ -1639,7 +1639,7 @@ the allocation sequence or switching to a structure conscious allocator. ...@@ -1639,7 +1639,7 @@ the allocation sequence or switching to a structure conscious allocator.
container member accesses. Issue advice for elements referenced by container member accesses. Issue advice for elements referenced by
multiple threads. multiple threads.
See paper: <ulink url="http://portal.acm.org/citation.cfm?id=207110.207148"> See paper: <ulink url="http://portal.acm.org/citation.cfm?id=207110.207148">
The LRPD test: speculative run-time parallelization of loops with The LRPD test: speculative run-time parallelization of loops with
privatization and reduction parallelization</ulink>. privatization and reduction parallelization</ulink>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
...@@ -1660,7 +1660,7 @@ the allocation sequence or switching to a structure conscious allocator. ...@@ -1660,7 +1660,7 @@ the allocation sequence or switching to a structure conscious allocator.
<code>_GLIBCXX_PROFILE_FALSE_SHARING</code>. <code>_GLIBCXX_PROFILE_FALSE_SHARING</code>.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Goal:</emphasis> Detect elements in the <listitem><para><emphasis>Goal:</emphasis> Detect elements in the
same container which share a cache line, are written by at least one same container which share a cache line, are written by at least one
thread, and accessed by different threads. thread, and accessed by different threads.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Fundamentals:</emphasis> Under these assumptions, <listitem><para><emphasis>Fundamentals:</emphasis> Under these assumptions,
...@@ -1676,16 +1676,16 @@ the allocation sequence or switching to a structure conscious allocator. ...@@ -1676,16 +1676,16 @@ the allocation sequence or switching to a structure conscious allocator.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Analysis:</emphasis> <listitem><para><emphasis>Analysis:</emphasis>
First, get the cache line size. First, get the cache line size.
For each shared container, record all the associated iterator dereferences For each shared container, record all the associated iterator dereferences
and member access methods with the thread id. Compare the address lists and member access methods with the thread id. Compare the address lists
across threads to detect references in two different threads to the same across threads to detect references in two different threads to the same
cache line. Issue a warning only if the ratio to total references is cache line. Issue a warning only if the ratio to total references is
significant. Do the same for iterator dereference values if they are significant. Do the same for iterator dereference values if they are
pointers.</para></listitem> pointers.</para></listitem>
<listitem><para><emphasis>Cost model:</emphasis> <listitem><para><emphasis>Cost model:</emphasis>
Number of accesses to same cache line from different threads. Number of accesses to same cache line from different threads.
</para></listitem> </para></listitem>
<listitem><para><emphasis>Example:</emphasis> <listitem><para><emphasis>Example:</emphasis>
<programlisting> <programlisting>
1 vector&lt;int&gt; v(2, 0); 1 vector&lt;int&gt; v(2, 0);
2 #pragma omp parallel for shared(v, SIZE) schedule(static, 1) 2 #pragma omp parallel for shared(v, SIZE) schedule(static, 1)
...@@ -1694,7 +1694,7 @@ the allocation sequence or switching to a structure conscious allocator. ...@@ -1694,7 +1694,7 @@ the allocation sequence or switching to a structure conscious allocator.
5 } 5 }
OMP_NUM_THREADS=2 ./a.out OMP_NUM_THREADS=2 ./a.out
foo.cc:1: advice: Change container structure or padding to avoid false foo.cc:1: advice: Change container structure or padding to avoid false
sharing in multithreaded access at foo.cc:4. Detected N shared cache lines. sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
</programlisting> </programlisting>
</para></listitem> </para></listitem>
...@@ -1704,7 +1704,7 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines. ...@@ -1704,7 +1704,7 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
</sect2> </sect2>
<sect2 id="manual.ext.profile_mode.analysis.statistics" <sect2 id="manual.ext.profile_mode.analysis.statistics"
xreflabel="Statistics"> xreflabel="Statistics">
<title>Statistics</title> <title>Statistics</title>
...@@ -1757,10 +1757,10 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines. ...@@ -1757,10 +1757,10 @@ sharing in multithreaded access at foo.cc:4. Detected N shared cache lines.
<publisher> <publisher>
<publishername> <publishername>
Proceedings of the 2009 International Symposium on Code Generation Proceedings of the 2009 International Symposium on Code Generation
and Optimization and Optimization
</publishername> </publishername>
</publisher> </publisher>
</biblioentry> </biblioentry>
</bibliography> </bibliography>
......
<sect1 id="manual.util.memory.shared_ptr" xreflabel="shared_ptr"> <section id="std.util.memory.shared_ptr" xreflabel="shared_ptr">
<?dbhtml filename="shared_ptr.html"?> <?dbhtml filename="shared_ptr.html"?>
<sect1info> <sectioninfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
shared_ptr shared_ptr
</keyword> </keyword>
</keywordset> </keywordset>
</sect1info> </sectioninfo>
<title>shared_ptr</title> <title>shared_ptr</title>
...@@ -19,7 +19,7 @@ The shared_ptr class template stores a pointer, usually obtained via new, ...@@ -19,7 +19,7 @@ The shared_ptr class template stores a pointer, usually obtained via new,
and implements shared ownership semantics. and implements shared ownership semantics.
</para> </para>
<sect2 id="shared_ptr.req"> <section id="shared_ptr.req">
<title>Requirements</title> <title>Requirements</title>
<para> <para>
...@@ -39,11 +39,11 @@ and implements shared ownership semantics. ...@@ -39,11 +39,11 @@ and implements shared ownership semantics.
apply. apply.
</para> </para>
<para> <para>
</para> </para>
</sect2> </section>
<sect2 id="shared_ptr.design_issues"> <section id="shared_ptr.design_issues">
<title>Design Issues</title> <title>Design Issues</title>
...@@ -65,12 +65,12 @@ where the correct dynamic type is known. This is an application of the ...@@ -65,12 +65,12 @@ where the correct dynamic type is known. This is an application of the
technique known as type erasure. technique known as type erasure.
</para> </para>
</sect2> </section>
<sect2 id="shared_ptr.impl"> <section id="shared_ptr.impl">
<title>Implementation</title> <title>Implementation</title>
<sect3> <section>
<title>Class Hierarchy</title> <title>Class Hierarchy</title>
<para> <para>
...@@ -156,9 +156,9 @@ that simplifies the implementation slightly. ...@@ -156,9 +156,9 @@ that simplifies the implementation slightly.
</variablelist> </variablelist>
</sect3> </section>
<sect3> <section>
<title>Thread Safety</title> <title>Thread Safety</title>
<para> <para>
...@@ -179,7 +179,7 @@ deprecated in C++0x mode. ...@@ -179,7 +179,7 @@ deprecated in C++0x mode.
</para> </para>
<para> <para>
The The
<ulink url="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety">Thread <ulink url="http://boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety">Thread
Safety</ulink> section of the Boost shared_ptr documentation says "shared_ptr Safety</ulink> section of the Boost shared_ptr documentation says "shared_ptr
objects offer the same level of thread safety as built-in types." objects offer the same level of thread safety as built-in types."
...@@ -232,12 +232,12 @@ makes things much simpler: we have an atomic CAS or we don't, see Lock ...@@ -232,12 +232,12 @@ makes things much simpler: we have an atomic CAS or we don't, see Lock
Policy below for details. Policy below for details.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Selecting Lock Policy</title> <title>Selecting Lock Policy</title>
<para> <para>
</para> </para>
<para> <para>
...@@ -300,9 +300,9 @@ used when libstdc++ is built without <literal>--enable-threads</literal>. ...@@ -300,9 +300,9 @@ used when libstdc++ is built without <literal>--enable-threads</literal>.
is multi-threaded. If only one thread of execution exists in is multi-threaded. If only one thread of execution exists in
the program then less expensive non-atomic operations are used. the program then less expensive non-atomic operations are used.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Dual C++0x and TR1 Implementation</title> <title>Dual C++0x and TR1 Implementation</title>
<para> <para>
...@@ -316,12 +316,12 @@ including <classname>_Sp_counted_base</classname> are shared by both implementat ...@@ -316,12 +316,12 @@ including <classname>_Sp_counted_base</classname> are shared by both implementat
<para> <para>
The TR1 implementation is considered relatively stable, so is unlikely to The TR1 implementation is considered relatively stable, so is unlikely to
change unless bug fixes require it. If the code that is common to both change unless bug fixes require it. If the code that is common to both
C++0x and TR1 modes needs to diverge further then it might be necessary to C++0x and TR1 modes needs to diverge further then it might be necessary to
duplicate additional classes and only make changes to the C++0x versions. duplicate additional classes and only make changes to the C++0x versions.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Related functions and classes</title> <title>Related functions and classes</title>
<variablelist> <variablelist>
...@@ -346,7 +346,7 @@ In C++0x mode these constructors and the related tag types are not needed. ...@@ -346,7 +346,7 @@ In C++0x mode these constructors and the related tag types are not needed.
<para> <para>
The clever overload to detect a base class of type The clever overload to detect a base class of type
<code>enable_shared_from_this</code> comes straight from Boost. <code>enable_shared_from_this</code> comes straight from Boost.
There is an extra overload for <code>__enable_shared_from_this</code> to There is an extra overload for <code>__enable_shared_from_this</code> to
work smoothly with <code>__shared_ptr&lt;Tp, Lp&gt;</code> using any lock work smoothly with <code>__shared_ptr&lt;Tp, Lp&gt;</code> using any lock
policy. policy.
</para> </para>
...@@ -382,9 +382,9 @@ be private. ...@@ -382,9 +382,9 @@ be private.
</variablelist> </variablelist>
</sect3> </section>
</sect2> </section>
<!--- XXX <!--- XXX
<listitem> <listitem>
...@@ -414,20 +414,20 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -414,20 +414,20 @@ the following types, depending on how the shared_ptr is constructed.
</listitem> </listitem>
--> -->
<sect2 id="shared_ptr.using"> <section id="shared_ptr.using">
<title>Use</title> <title>Use</title>
<sect3> <section>
<title>Examples</title> <title>Examples</title>
<para> <para>
Examples of use can be found in the testsuite, under Examples of use can be found in the testsuite, under
<filename class="directory">testsuite/tr1/2_general_utilities/shared_ptr</filename>. <filename class="directory">testsuite/tr1/2_general_utilities/shared_ptr</filename>.
</para> </para>
</sect3> </section>
<sect3> <section>
<title>Unresolved Issues</title> <title>Unresolved Issues</title>
<para> <para>
The resolution to C++ Standard Library issue <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</ulink>, The resolution to C++ Standard Library issue <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#674">674</ulink>,
"shared_ptr interface changes for consistency with N1856" will "shared_ptr interface changes for consistency with N1856" will
need to be implemented after it is accepted into the working need to be implemented after it is accepted into the working
...@@ -481,21 +481,21 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -481,21 +481,21 @@ the following types, depending on how the shared_ptr is constructed.
*_pointer_cast functions. Constructor could be private in TR1 *_pointer_cast functions. Constructor could be private in TR1
mode, with the cast functions as friends. mode, with the cast functions as friends.
</para> </para>
</sect3> </section>
</sect2> </section>
<sect2 id="shared_ptr.ack"> <section id="shared_ptr.ack">
<title>Acknowledgments</title> <title>Acknowledgments</title>
<para> <para>
The original authors of the Boost shared_ptr, which is really nice The original authors of the Boost shared_ptr, which is really nice
code to work with, Peter Dimov in particular for his help and code to work with, Peter Dimov in particular for his help and
invaluable advice on thread safety. Phillip Jordan and Paolo invaluable advice on thread safety. Phillip Jordan and Paolo
Carlini for the lock policy implementation. Carlini for the lock policy implementation.
</para> </para>
</sect2> </section>
<bibliography id="shared_ptr.biblio"> <bibliography id="shared_ptr.biblio">
<title>Bibliography</title> <title>Bibliography</title>
...@@ -511,7 +511,7 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -511,7 +511,7 @@ the following types, depending on how the shared_ptr is constructed.
<subtitle> <subtitle>
N2351 N2351
</subtitle> </subtitle>
</biblioentry> </biblioentry>
<biblioentry> <biblioentry>
<biblioid class="uri"> <biblioid class="uri">
...@@ -524,7 +524,7 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -524,7 +524,7 @@ the following types, depending on how the shared_ptr is constructed.
<subtitle> <subtitle>
N2456 N2456
</subtitle> </subtitle>
</biblioentry> </biblioentry>
<biblioentry> <biblioentry>
<biblioid class="uri"> <biblioid class="uri">
...@@ -537,7 +537,7 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -537,7 +537,7 @@ the following types, depending on how the shared_ptr is constructed.
<subtitle> <subtitle>
N2461 N2461
</subtitle> </subtitle>
</biblioentry> </biblioentry>
<biblioentry> <biblioentry>
<biblioid class="uri"> <biblioid class="uri">
...@@ -550,8 +550,8 @@ the following types, depending on how the shared_ptr is constructed. ...@@ -550,8 +550,8 @@ the following types, depending on how the shared_ptr is constructed.
<subtitle> <subtitle>
N2461 N2461
</subtitle> </subtitle>
</biblioentry> </biblioentry>
</bibliography> </bibliography>
</sect1> </section>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<book id="manual-index"> <book id="manual-index">
...@@ -24,92 +24,106 @@ ...@@ -24,92 +24,106 @@
</bookinfo> </bookinfo>
<!-- Part 01 : Intro --> <!-- Part 01 : Intro -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="intro.xml"> parse="xml" href="intro.xml">
</xi:include> </xi:include>
<!-- Part 02 : Support --> <!-- Part 02 : Standard Contents -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <part id="manual.std" xreflabel="Standard Contents">
<title>
Standard Contents
</title>
<!-- Chapter 01 : Support -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="support.xml"> parse="xml" href="support.xml">
</xi:include> </xi:include>
<!-- Part 03 : Diagnostics -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <!-- Chapter 02 : Diagnostics -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="diagnostics.xml"> parse="xml" href="diagnostics.xml">
</xi:include> </xi:include>
<!-- Part 04 : Utilities --> <!-- Chapter 03 : Utilities -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="utilities.xml"> parse="xml" href="utilities.xml">
</xi:include> </xi:include>
<!-- Part 05 : Strings --> <!-- Chapter 04 : Strings -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="strings.xml"> parse="xml" href="strings.xml">
</xi:include> </xi:include>
<!-- Part 06 : Localization --> <!-- Chapter 05 : Localization -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="localization.xml"> parse="xml" href="localization.xml">
</xi:include> </xi:include>
<!-- Part 07 : Containers --> <!-- Chapter 06 : Containers -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="containers.xml"> parse="xml" href="containers.xml">
</xi:include> </xi:include>
<!-- Part 08 : Iterators --> <!-- Chapter 07 : Iterators -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="iterators.xml"> parse="xml" href="iterators.xml">
</xi:include> </xi:include>
<!-- Part 09 : Algorithms --> <!-- Chapter 08 : Algorithms -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="algorithms.xml"> parse="xml" href="algorithms.xml">
</xi:include> </xi:include>
<!-- Part 10 : Numerics --> <!-- Chapter 09 : Numerics -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="numerics.xml"> parse="xml" href="numerics.xml">
</xi:include> </xi:include>
<!-- Part 11 : Input Output --> <!-- Chapter 10 : Input Output -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="io.xml"> parse="xml" href="io.xml">
</xi:include> </xi:include>
<!-- Part 12 : Extensions --> </part>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
<!-- Part 03 : Extensions -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="extensions.xml"> parse="xml" href="extensions.xml">
</xi:include> </xi:include>
<!-- Part 04 : Appendices -->
<part id="appendix" xreflabel="Appendices">
<title>
Appendices
</title>
<!-- Appendix A --> <!-- Appendix A -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_contributing.xml"> parse="xml" href="appendix_contributing.xml">
</xi:include> </xi:include>
<!-- Appendix B --> <!-- Appendix B -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_porting.xml"> parse="xml" href="appendix_porting.xml">
</xi:include> </xi:include>
<!-- Appendix C --> <!-- Appendix C -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="appendix_free.xml"> parse="xml" href="appendix_free.xml">
</xi:include> </xi:include>
<!-- Appendix D --> <!-- Appendix D -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="../gnu/gpl-3.0.xml"> parse="xml" href="../gnu/gpl-3.0.xml">
</xi:include> </xi:include>
<!-- Appendix E --> <!-- Appendix E -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="../gnu/fdl-1.2.xml"> parse="xml" href="../gnu/fdl-1.2.xml">
</xi:include> </xi:include>
<!-- Index --> </part>
<index/>
</book> </book>
<sect2 id="status.iso.1998" xreflabel="ISO C++ 1998"> <sect2 id="status.iso.1998" xreflabel="ISO C++ 1998">
<?dbhtml filename="status_iso_cxx1998.html"?> <?dbhtml filename="status_iso_cxx1998.html"?>
<sect2info> <sect2info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -27,13 +27,13 @@ particular release. ...@@ -27,13 +27,13 @@ particular release.
</para> </para>
<!-- Status is Yes or No, Broken/Partial--> <!-- Status is Yes or No, Broken/Partial-->
<!-- <!--
Yes Yes
No No
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
Broken/Partial Broken/Partial
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
--> -->
<table frame='all'> <table frame='all'>
<title>C++ 1998/2003 Implementation Status</title> <title>C++ 1998/2003 Implementation Status</title>
...@@ -1047,8 +1047,8 @@ particular release. ...@@ -1047,8 +1047,8 @@ particular release.
<listitem> <listitem>
<para> <para>
Behavior, for a well-formed program construct and correct data, that Behavior, for a well-formed program construct and correct data, that
depends on the implementation <emphasis>and that each implementation depends on the implementation <emphasis>and that each implementation
shall document</emphasis>. shall document</emphasis>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -1074,11 +1074,11 @@ particular release. ...@@ -1074,11 +1074,11 @@ particular release.
discussed in the various sections on multithreading (see above). discussed in the various sections on multithreading (see above).
</para> </para>
<!-- [17.4.4.8]/3 says any function that doesn't have an exception-spec <!-- [17.4.4.8]/3 says any function that doesn't have an exception-spec
can throw whatever we want; see also its footnote. Let's list those can throw whatever we want; see also its footnote. Let's list those
in the sections where the function itself occurs. in the sections where the function itself occurs.
--> -->
<para><emphasis>[18.1]/4</emphasis> The type of <code>NULL</code> is described <para><emphasis>[18.1]/4</emphasis> The type of <code>NULL</code> is described
<link linkend="manual.support.types.null">here</link>. <link linkend="std.support.types.null">here</link>.
</para> </para>
<para><emphasis>[18.3]/8</emphasis> Even though it's listed in the library <para><emphasis>[18.3]/8</emphasis> Even though it's listed in the library
sections, libstdc++ has zero control over what the cleanup code hands sections, libstdc++ has zero control over what the cleanup code hands
...@@ -1125,12 +1125,12 @@ particular release. ...@@ -1125,12 +1125,12 @@ particular release.
</para> </para>
<para><emphasis>[21.1.3.1]/5</emphasis> I don't really know about <para><emphasis>[21.1.3.1]/5</emphasis> I don't really know about
the mbstate_t stuff... see the mbstate_t stuff... see
the <link linkend="manual.localization.facet.codecvt">chapter 22 the <link linkend="std.localization.facet.codecvt">chapter 22
notes</link> for what does exist. notes</link> for what does exist.
</para> </para>
<para><emphasis>[22.*]</emphasis> Anything and everything we have on locale <para><emphasis>[22.*]</emphasis> Anything and everything we have on locale
implementation will be described implementation will be described
<link linkend="manual.localization.locales.locale">over here</link>. <link linkend="std.localization.locales.locale">over here</link>.
</para> </para>
<para><emphasis>[26.2.8]/9</emphasis> I have no idea what <para><emphasis>[26.2.8]/9</emphasis> I have no idea what
<code>complex&lt;T&gt;</code>'s pow(0,0) returns. <code>complex&lt;T&gt;</code>'s pow(0,0) returns.
...@@ -1152,7 +1152,7 @@ particular release. ...@@ -1152,7 +1152,7 @@ particular release.
<para><emphasis>[27.7.1.3]/16</emphasis>, <para><emphasis>[27.7.1.3]/16</emphasis>,
<emphasis>[27.8.1.4]/10</emphasis> <emphasis>[27.8.1.4]/10</emphasis>
The effects of <code>pubsetbuf/setbuf</code> are described The effects of <code>pubsetbuf/setbuf</code> are described
<link linkend="manual.io">in this chapter</link>. <link linkend="std.io">in this chapter</link>.
</para> </para>
<para><emphasis>[27.8.1.4]/16</emphasis> Calling <code>fstream::sync</code> when <para><emphasis>[27.8.1.4]/16</emphasis> Calling <code>fstream::sync</code> when
a get area exists will... whatever <code>fflush()</code> does, I think. a get area exists will... whatever <code>fflush()</code> does, I think.
......
<sect2 id="status.iso.200x" xreflabel="Status C++ 200x"> <sect2 id="status.iso.200x" xreflabel="Status C++ 200x">
<?dbhtml filename="status_iso_cxx200x.html"?> <?dbhtml filename="status_iso_cxx200x.html"?>
<sect2info> <sect2info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<title>C++ 200x</title> <title>C++ 200x</title>
<para> <para>
This table is based on the table of contents of ISO/IEC This table is based on the table of contents of ISO/IEC
Doc No: N3000=09-0190 Date: 2009-11-09 Doc No: N3000=09-0190 Date: 2009-11-09
Working Draft, Standard for Programming Language C++ Working Draft, Standard for Programming Language C++
</para> </para>
...@@ -36,13 +36,13 @@ particular release. ...@@ -36,13 +36,13 @@ particular release.
</para> </para>
<!-- Status is Yes or No, Broken/Partial--> <!-- Status is Yes or No, Broken/Partial-->
<!-- <!--
Yes Yes
No No
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
Broken/Partial Broken/Partial
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
--> -->
<table frame='all'> <table frame='all'>
<title>C++ 200x Implementation Status</title> <title>C++ 200x Implementation Status</title>
...@@ -77,7 +77,7 @@ particular release. ...@@ -77,7 +77,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>18.2</entry> <entry>18.2</entry>
<entry>Types</entry> <entry>Types</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -103,21 +103,21 @@ particular release. ...@@ -103,21 +103,21 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>18.3.1.2</entry> <entry>18.3.1.2</entry>
<entry><code>numeric_limits</code> members</entry> <entry><code>numeric_limits</code> members</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>Missing constexpr</entry> <entry>Missing constexpr</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>18.3.1.3</entry> <entry>18.3.1.3</entry>
<entry><code>float_round_style</code></entry> <entry><code>float_round_style</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>18.3.1.4</entry> <entry>18.3.1.4</entry>
<entry><code>float_denorm_style</code></entry> <entry><code>float_denorm_style</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -150,14 +150,14 @@ particular release. ...@@ -150,14 +150,14 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>18.4.2</entry> <entry>18.4.2</entry>
<entry>The header <code>&lt;stdint.h&gt;</code></entry> <entry>The header <code>&lt;stdint.h&gt;</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>May use configure-generated stdint.h via GCC_HEADER_STDINT</entry> <entry>May use configure-generated stdint.h via GCC_HEADER_STDINT</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>18.5</entry> <entry>18.5</entry>
<entry>Start and termination</entry> <entry>Start and termination</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -182,7 +182,7 @@ particular release. ...@@ -182,7 +182,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>18.7.2</entry> <entry>18.7.2</entry>
<entry>Class type_index</entry> <entry>Class type_index</entry>
<entry>N</entry> <entry>N</entry>
...@@ -261,7 +261,7 @@ particular release. ...@@ -261,7 +261,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>18.9.3</entry> <entry>18.9.3</entry>
<entry>Initializer list concept maps</entry> <entry>Initializer list concept maps</entry>
<entry>N</entry> <entry>N</entry>
...@@ -318,14 +318,14 @@ particular release. ...@@ -318,14 +318,14 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>19.5.2</entry> <entry>19.5.2</entry>
<entry>Class <code>error_code</code></entry> <entry>Class <code>error_code</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>Missing concept ErrorCodeEnum</entry> <entry>Missing concept ErrorCodeEnum</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>19.5.3</entry> <entry>19.5.3</entry>
<entry>Class <code>error_condition</code></entry> <entry>Class <code>error_condition</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -352,14 +352,14 @@ particular release. ...@@ -352,14 +352,14 @@ particular release.
</entry> </entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.1</entry> <entry>20.1</entry>
<entry>General</entry> <entry>General</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>Missing all concepts</entry> <entry>Missing all concepts</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.2</entry> <entry>20.2</entry>
<entry>Concepts</entry> <entry>Concepts</entry>
<entry>N</entry> <entry>N</entry>
...@@ -396,7 +396,7 @@ particular release. ...@@ -396,7 +396,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.3.5</entry> <entry>20.3.5</entry>
<entry>Range concept maps for <code>pair</code></entry> <entry>Range concept maps for <code>pair</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -451,7 +451,7 @@ particular release. ...@@ -451,7 +451,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.5.2</entry> <entry>20.5.2</entry>
<entry>Class template <code>tuple</code></entry> <entry>Class template <code>tuple</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -470,7 +470,7 @@ particular release. ...@@ -470,7 +470,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.6.2</entry> <entry>20.6.2</entry>
<entry>Header <code>&lt;type_traits&gt;</code> synopsis</entry> <entry>Header <code>&lt;type_traits&gt;</code> synopsis</entry>
<entry></entry> <entry></entry>
...@@ -501,7 +501,7 @@ particular release. ...@@ -501,7 +501,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.6.4.3</entry> <entry>20.6.4.3</entry>
<entry>Type properties</entry> <entry>Type properties</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -550,7 +550,7 @@ particular release. ...@@ -550,7 +550,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.6.7</entry> <entry>20.6.7</entry>
<entry>Other transformations</entry> <entry>Other transformations</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -587,7 +587,7 @@ particular release. ...@@ -587,7 +587,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.7.6</entry> <entry>20.7.6</entry>
<entry>Identity operation</entry> <entry>Identity operation</entry>
<entry>N</entry> <entry>N</entry>
...@@ -672,7 +672,7 @@ particular release. ...@@ -672,7 +672,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.7.18</entry> <entry>20.7.18</entry>
<entry>Class template <code>reference_closure</code></entry> <entry>Class template <code>reference_closure</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -685,7 +685,7 @@ particular release. ...@@ -685,7 +685,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.01</entry> <entry>20.8.01</entry>
<entry>Allocator argument tag</entry> <entry>Allocator argument tag</entry>
<entry>N</entry> <entry>N</entry>
...@@ -704,42 +704,42 @@ particular release. ...@@ -704,42 +704,42 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.02.2</entry> <entry>20.8.02.2</entry>
<entry>Allocator concept</entry> <entry>Allocator concept</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.02.3</entry> <entry>20.8.02.3</entry>
<entry>Support for legacy allocators</entry> <entry>Support for legacy allocators</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.02.4</entry> <entry>20.8.02.4</entry>
<entry>Allocator and Legacy Allocator members</entry> <entry>Allocator and Legacy Allocator members</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.03</entry> <entry>20.8.03</entry>
<entry>Allocator-related element concepts</entry> <entry>Allocator-related element concepts</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.04</entry> <entry>20.8.04</entry>
<entry>Allocator propagation traits</entry> <entry>Allocator propagation traits</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.05</entry> <entry>20.8.05</entry>
<entry>Allocator propagation map</entry> <entry>Allocator propagation map</entry>
<entry>N</entry> <entry>N</entry>
...@@ -758,35 +758,35 @@ particular release. ...@@ -758,35 +758,35 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.07.1</entry> <entry>20.8.07.1</entry>
<entry><code>scoped_allocator_adaptor_base</code></entry> <entry><code>scoped_allocator_adaptor_base</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.07.2</entry> <entry>20.8.07.2</entry>
<entry><code>scoped_allocator_adaptor constructors</code></entry> <entry><code>scoped_allocator_adaptor constructors</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.07.3</entry> <entry>20.8.07.3</entry>
<entry><code>scoped_allocator_adaptor2</code></entry> <entry><code>scoped_allocator_adaptor2</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.07.3</entry> <entry>20.8.07.3</entry>
<entry>scoped_allocator_adaptor members</entry> <entry>scoped_allocator_adaptor members</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.07.4</entry> <entry>20.8.07.4</entry>
<entry><code>scoped_allocator_adaptor globals</code></entry> <entry><code>scoped_allocator_adaptor globals</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -805,7 +805,7 @@ particular release. ...@@ -805,7 +805,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.10</entry> <entry>20.8.10</entry>
<entry><code>construct_element</code></entry> <entry><code>construct_element</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -818,7 +818,7 @@ particular release. ...@@ -818,7 +818,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.11.1</entry> <entry>20.8.11.1</entry>
<entry><code>addressof</code></entry> <entry><code>addressof</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -868,7 +868,7 @@ particular release. ...@@ -868,7 +868,7 @@ particular release.
<para> <para>
Uses code from Uses code from
<ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</ulink>. <ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</ulink>.
</para> </para>
</entry> </entry>
</row> </row>
<row> <row>
...@@ -890,21 +890,21 @@ particular release. ...@@ -890,21 +890,21 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.8.13.6</entry> <entry>20.8.13.6</entry>
<entry><code>shared_ptr</code> atomic access</entry> <entry><code>shared_ptr</code> atomic access</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>20.8.13.7</entry> <entry>20.8.13.7</entry>
<entry>Pointer safety</entry> <entry>Pointer safety</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>20.8.14</entry> <entry>20.8.14</entry>
<entry>Align</entry> <entry>Align</entry>
<entry>N</entry> <entry>N</entry>
...@@ -1143,14 +1143,14 @@ particular release. ...@@ -1143,14 +1143,14 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>22.3.3.2.2</entry> <entry>22.3.3.2.2</entry>
<entry>String</entry> <entry>String</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>22.3.3.2.3</entry> <entry>22.3.3.2.3</entry>
<entry>Buffer</entry> <entry>Buffer</entry>
<entry>N</entry> <entry>N</entry>
...@@ -1271,7 +1271,7 @@ particular release. ...@@ -1271,7 +1271,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>22.5</entry> <entry>22.5</entry>
<entry>Standard code conversion facets</entry> <entry>Standard code conversion facets</entry>
<entry>N</entry> <entry>N</entry>
...@@ -1292,7 +1292,7 @@ particular release. ...@@ -1292,7 +1292,7 @@ particular release.
</entry> </entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>23.1</entry> <entry>23.1</entry>
<entry>General</entry> <entry>General</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -1305,7 +1305,7 @@ particular release. ...@@ -1305,7 +1305,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>23.2.1</entry> <entry>23.2.1</entry>
<entry>General requirements</entry> <entry>General requirements</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -1452,21 +1452,21 @@ particular release. ...@@ -1452,21 +1452,21 @@ particular release.
</entry> </entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>24.1</entry> <entry>24.1</entry>
<entry>General</entry> <entry>General</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>Missing concepts</entry> <entry>Missing concepts</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>24.2</entry> <entry>24.2</entry>
<entry>Iterator concepts</entry> <entry>Iterator concepts</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>24.3</entry> <entry>24.3</entry>
<entry>Header <code>&lt;iterator&gt;</code> synopsis</entry> <entry>Header <code>&lt;iterator&gt;</code> synopsis</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -1565,7 +1565,7 @@ particular release. ...@@ -1565,7 +1565,7 @@ particular release.
</entry> </entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>25.1</entry> <entry>25.1</entry>
<entry>General</entry> <entry>General</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -1640,14 +1640,14 @@ particular release. ...@@ -1640,14 +1640,14 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>26.5.1</entry> <entry>26.5.1</entry>
<entry>Header <code>&lt;random&gt;</code> synopsis</entry> <entry>Header <code>&lt;random&gt;</code> synopsis</entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry>Missing concepts</entry> <entry>Missing concepts</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>26.5.2</entry> <entry>26.5.2</entry>
<entry>Concepts and related requirements</entry> <entry>Concepts and related requirements</entry>
<entry>N</entry> <entry>N</entry>
...@@ -2022,7 +2022,7 @@ particular release. ...@@ -2022,7 +2022,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>27.2.3</entry> <entry>27.2.3</entry>
<entry>Thread safety</entry> <entry>Thread safety</entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -2091,35 +2091,35 @@ particular release. ...@@ -2091,35 +2091,35 @@ particular release.
</entry> </entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.01</entry> <entry>28.01</entry>
<entry>General</entry> <entry>General</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.02</entry> <entry>28.02</entry>
<entry>Definitions</entry> <entry>Definitions</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.03</entry> <entry>28.03</entry>
<entry>Requirements</entry> <entry>Requirements</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.04</entry> <entry>28.04</entry>
<entry>Regular expressions summary</entry> <entry>Regular expressions summary</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.05</entry> <entry>28.05</entry>
<entry>Header <code>&lt;regex&gt;</code> synopsis</entry> <entry>Header <code>&lt;regex&gt;</code> synopsis</entry>
<entry>N</entry> <entry>N</entry>
...@@ -2138,49 +2138,49 @@ particular release. ...@@ -2138,49 +2138,49 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>28.08</entry> <entry>28.08</entry>
<entry>Class template <code>regex_traits</code></entry> <entry>Class template <code>regex_traits</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>28.09</entry> <entry>28.09</entry>
<entry>Class template <code>basic_regex</code></entry> <entry>Class template <code>basic_regex</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>28.10</entry> <entry>28.10</entry>
<entry>Class template <code>sub_match</code></entry> <entry>Class template <code>sub_match</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>28.11</entry> <entry>28.11</entry>
<entry>Class template <code>match_results</code></entry> <entry>Class template <code>match_results</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.12</entry> <entry>28.12</entry>
<entry>Regular expression algorithms</entry> <entry>Regular expression algorithms</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.13</entry> <entry>28.13</entry>
<entry>Regular expression Iterators</entry> <entry>Regular expression Iterators</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>28.14</entry> <entry>28.14</entry>
<entry>Modified ECMAScript regular expression grammar</entry> <entry>Modified ECMAScript regular expression grammar</entry>
<entry>N</entry> <entry>N</entry>
...@@ -2207,7 +2207,7 @@ particular release. ...@@ -2207,7 +2207,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>29.3</entry> <entry>29.3</entry>
<entry>Order and consistency</entry> <entry>Order and consistency</entry>
<entry>N</entry> <entry>N</entry>
...@@ -2256,7 +2256,7 @@ particular release. ...@@ -2256,7 +2256,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>29.8</entry> <entry>29.8</entry>
<entry>Fences</entry> <entry>Fences</entry>
<entry>N</entry> <entry>N</entry>
...@@ -2289,7 +2289,7 @@ particular release. ...@@ -2289,7 +2289,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>30.3.1</entry> <entry>30.3.1</entry>
<entry>Class <code>thread</code></entry> <entry>Class <code>thread</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -2398,7 +2398,7 @@ particular release. ...@@ -2398,7 +2398,7 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
<entry>30.5.2</entry> <entry>30.5.2</entry>
<entry>Class <code>condition_variable_any</code></entry> <entry>Class <code>condition_variable_any</code></entry>
<entry>Partial</entry> <entry>Partial</entry>
...@@ -2411,56 +2411,56 @@ particular release. ...@@ -2411,56 +2411,56 @@ particular release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.1</entry> <entry>30.6.1</entry>
<entry>Overview</entry> <entry>Overview</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.2</entry> <entry>30.6.2</entry>
<entry>Error handling</entry> <entry>Error handling</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.3</entry> <entry>30.6.3</entry>
<entry>Class <code>future_error</code></entry> <entry>Class <code>future_error</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.4</entry> <entry>30.6.4</entry>
<entry>Class template <code>unique_future</code></entry> <entry>Class template <code>unique_future</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.5</entry> <entry>30.6.5</entry>
<entry>Class template <code>shared_future</code></entry> <entry>Class template <code>shared_future</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.6</entry> <entry>30.6.6</entry>
<entry>Class template <code>promise</code></entry> <entry>Class template <code>promise</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.7</entry> <entry>30.6.7</entry>
<entry>Allocator templates</entry> <entry>Allocator templates</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>30.6.8</entry> <entry>30.6.8</entry>
<entry>Class template <code>packaged_task</code></entry> <entry>Class template <code>packaged_task</code></entry>
<entry>N</entry> <entry>N</entry>
......
<sect2 id="status.iso.tr1" xreflabel="Status C++ TR1"> <sect2 id="status.iso.tr1" xreflabel="Status C++ TR1">
<?dbhtml filename="status_iso_cxxtr1.html"?> <?dbhtml filename="status_iso_cxxtr1.html"?>
<sect2info> <sect2info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -32,13 +32,13 @@ release. ...@@ -32,13 +32,13 @@ release.
</para> </para>
<!-- Status is Yes or No, Broken/Partial--> <!-- Status is Yes or No, Broken/Partial-->
<!-- <!--
Yes Yes
No No
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
Broken/Partial Broken/Partial
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
--> -->
<table frame='all'> <table frame='all'>
<title>C++ TR1 Implementation Status</title> <title>C++ TR1 Implementation Status</title>
...@@ -135,7 +135,7 @@ release. ...@@ -135,7 +135,7 @@ release.
<para> <para>
Uses code from Uses code from
<ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</ulink>. <ulink url="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</ulink>.
</para> </para>
</entry> </entry>
</row> </row>
<row> <row>
...@@ -1030,322 +1030,322 @@ release. ...@@ -1030,322 +1030,322 @@ release.
<entry namest="c2" nameend="c4" align="left"><emphasis>Regular Expressions</emphasis></entry> <entry namest="c2" nameend="c4" align="left"><emphasis>Regular Expressions</emphasis></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.1</entry> <entry>7.1</entry>
<entry>Definitions</entry> <entry>Definitions</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.2</entry> <entry>7.2</entry>
<entry>Requirements</entry> <entry>Requirements</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.3</entry> <entry>7.3</entry>
<entry>Regular expressions summary</entry> <entry>Regular expressions summary</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.4</entry> <entry>7.4</entry>
<entry>Header <code>&lt;regex&gt;</code> synopsis</entry> <entry>Header <code>&lt;regex&gt;</code> synopsis</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.5</entry> <entry>7.5</entry>
<entry>Namespace <code>tr1::regex_constants</code></entry> <entry>Namespace <code>tr1::regex_constants</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.5.1</entry> <entry>7.5.1</entry>
<entry>Bitmask Type <code>syntax_option_type</code></entry> <entry>Bitmask Type <code>syntax_option_type</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.5.2</entry> <entry>7.5.2</entry>
<entry>Bitmask Type <code>regex_constants::match_flag_type</code></entry> <entry>Bitmask Type <code>regex_constants::match_flag_type</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.5.3</entry> <entry>7.5.3</entry>
<entry>Implementation defined <code>error_type</code></entry> <entry>Implementation defined <code>error_type</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.6</entry> <entry>7.6</entry>
<entry>Class <code>regex_error</code></entry> <entry>Class <code>regex_error</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.7</entry> <entry>7.7</entry>
<entry>Class template <code>regex_traits</code></entry> <entry>Class template <code>regex_traits</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8</entry> <entry>7.8</entry>
<entry>Class template <code>basic_regex</code></entry> <entry>Class template <code>basic_regex</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.1</entry> <entry>7.8.1</entry>
<entry><code>basic_regex</code> constants</entry> <entry><code>basic_regex</code> constants</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.2</entry> <entry>7.8.2</entry>
<entry><code>basic_regex</code> constructors</entry> <entry><code>basic_regex</code> constructors</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.3</entry> <entry>7.8.3</entry>
<entry><code>basic_regex</code> assign</entry> <entry><code>basic_regex</code> assign</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.4</entry> <entry>7.8.4</entry>
<entry><code>basic_regex</code> constant operations</entry> <entry><code>basic_regex</code> constant operations</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.5</entry> <entry>7.8.5</entry>
<entry><code>basic_regex</code> locale</entry> <entry><code>basic_regex</code> locale</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.6</entry> <entry>7.8.6</entry>
<entry><code>basic_regex</code> swap</entry> <entry><code>basic_regex</code> swap</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.7</entry> <entry>7.8.7</entry>
<entry><code>basic_regex</code> non-member functions</entry> <entry><code>basic_regex</code> non-member functions</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.8.7.1</entry> <entry>7.8.7.1</entry>
<entry><code>basic_regex</code> non-member swap</entry> <entry><code>basic_regex</code> non-member swap</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.9</entry> <entry>7.9</entry>
<entry>Class template <code>sub_match</code></entry> <entry>Class template <code>sub_match</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.9.1</entry> <entry>7.9.1</entry>
<entry><code>sub_match</code> members</entry> <entry><code>sub_match</code> members</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.9.2</entry> <entry>7.9.2</entry>
<entry><code>sub_match</code> non-member operators</entry> <entry><code>sub_match</code> non-member operators</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10</entry> <entry>7.10</entry>
<entry>Class template <code>match_results</code></entry> <entry>Class template <code>match_results</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.1</entry> <entry>7.10.1</entry>
<entry><code>match_results</code> constructors</entry> <entry><code>match_results</code> constructors</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.2</entry> <entry>7.10.2</entry>
<entry><code>match_results</code> size</entry> <entry><code>match_results</code> size</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.3</entry> <entry>7.10.3</entry>
<entry><code>match_results</code> element access</entry> <entry><code>match_results</code> element access</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.4</entry> <entry>7.10.4</entry>
<entry><code>match_results</code> formatting</entry> <entry><code>match_results</code> formatting</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.5</entry> <entry>7.10.5</entry>
<entry><code>match_results</code> allocator</entry> <entry><code>match_results</code> allocator</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.10.6</entry> <entry>7.10.6</entry>
<entry><code>match_results</code> swap</entry> <entry><code>match_results</code> swap</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.11</entry> <entry>7.11</entry>
<entry>Regular expression algorithms</entry> <entry>Regular expression algorithms</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.11.1</entry> <entry>7.11.1</entry>
<entry>exceptions</entry> <entry>exceptions</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.11.2</entry> <entry>7.11.2</entry>
<entry><code>regex_match</code></entry> <entry><code>regex_match</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.11.3</entry> <entry>7.11.3</entry>
<entry><code>regex_search</code></entry> <entry><code>regex_search</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.11.4</entry> <entry>7.11.4</entry>
<entry><code>regex_replace</code></entry> <entry><code>regex_replace</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12</entry> <entry>7.12</entry>
<entry>Regular expression Iterators</entry> <entry>Regular expression Iterators</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.1</entry> <entry>7.12.1</entry>
<entry>Class template <code>regex_iterator</code></entry> <entry>Class template <code>regex_iterator</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.1.1</entry> <entry>7.12.1.1</entry>
<entry><code>regex_iterator</code> constructors</entry> <entry><code>regex_iterator</code> constructors</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.1.2</entry> <entry>7.12.1.2</entry>
<entry><code>regex_iterator</code> comparisons</entry> <entry><code>regex_iterator</code> comparisons</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.1.3</entry> <entry>7.12.1.3</entry>
<entry><code>regex_iterator</code> dereference</entry> <entry><code>regex_iterator</code> dereference</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.1.4</entry> <entry>7.12.1.4</entry>
<entry><code>regex_iterator</code> increment</entry> <entry><code>regex_iterator</code> increment</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.2</entry> <entry>7.12.2</entry>
<entry>Class template <code>regex_token_iterator</code></entry> <entry>Class template <code>regex_token_iterator</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.2.1</entry> <entry>7.12.2.1</entry>
<entry><code>regex_token_iterator</code> constructors</entry> <entry><code>regex_token_iterator</code> constructors</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.2.2</entry> <entry>7.12.2.2</entry>
<entry><code>regex_token_iterator</code> comparisons</entry> <entry><code>regex_token_iterator</code> comparisons</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.2.3</entry> <entry>7.12.2.3</entry>
<entry><code>regex_token_iterator</code> dereference</entry> <entry><code>regex_token_iterator</code> dereference</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.12.2.4</entry> <entry>7.12.2.4</entry>
<entry><code>regex_token_iterator</code> increment</entry> <entry><code>regex_token_iterator</code> increment</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>7.13</entry> <entry>7.13</entry>
<entry>Modified ECMAScript regular expression grammar</entry> <entry>Modified ECMAScript regular expression grammar</entry>
<entry>N</entry> <entry>N</entry>
...@@ -1416,14 +1416,14 @@ release. ...@@ -1416,14 +1416,14 @@ release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.2</entry> <entry>8.2</entry>
<entry>Header <code>&lt;ccomplex&gt;</code></entry> <entry>Header <code>&lt;ccomplex&gt;</code></entry>
<entry>N</entry> <entry>N</entry>
<entry>DR 551</entry> <entry>DR 551</entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.3</entry> <entry>8.3</entry>
<entry>Header <code>&lt;complex.h&gt;</code></entry> <entry>Header <code>&lt;complex.h&gt;</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -1490,21 +1490,21 @@ release. ...@@ -1490,21 +1490,21 @@ release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.10</entry> <entry>8.10</entry>
<entry>Additions to header <code>&lt;ios&gt;</code></entry> <entry>Additions to header <code>&lt;ios&gt;</code></entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.10.1</entry> <entry>8.10.1</entry>
<entry>Synopsis</entry> <entry>Synopsis</entry>
<entry>N</entry> <entry>N</entry>
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.10.2</entry> <entry>8.10.2</entry>
<entry>Function <code>hexfloat</code></entry> <entry>Function <code>hexfloat</code></entry>
<entry>N</entry> <entry>N</entry>
...@@ -1547,7 +1547,7 @@ release. ...@@ -1547,7 +1547,7 @@ release.
<entry></entry> <entry></entry>
</row> </row>
<row> <row>
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
<entry>8.15</entry> <entry>8.15</entry>
<entry>Additions to header <code>&lt;locale&gt;</code></entry> <entry>Additions to header <code>&lt;locale&gt;</code></entry>
<entry>N</entry> <entry>N</entry>
......
<sect2 id="status.iso.tr24733" xreflabel="Status C++ TR24733"> <sect2 id="status.iso.tr24733" xreflabel="Status C++ TR24733">
<?dbhtml filename="status_iso_cxxtr24733.html"?> <?dbhtml filename="status_iso_cxxtr24733.html"?>
<sect2info> <sect2info>
<keywordset> <keywordset>
<keyword> <keyword>
...@@ -24,12 +24,12 @@ particular release. ...@@ -24,12 +24,12 @@ particular release.
</para> </para>
<!-- Status is Yes or No, Broken/Partial--> <!-- Status is Yes or No, Broken/Partial-->
<!-- <!--
Yes Yes
No No
<?dbhtml bgcolor="#C8B0B0" ?> <?dbhtml bgcolor="#C8B0B0" ?>
Broken/Partial Broken/Partial
<?dbhtml bgcolor="#B0B0B0" ?> <?dbhtml bgcolor="#B0B0B0" ?>
--> -->
<table frame='all'> <table frame='all'>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.strings" xreflabel="Strings"> <chapter id="std.strings" xreflabel="Strings">
<?dbhtml filename="strings.html"?> <?dbhtml filename="strings.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,20 +15,20 @@ ...@@ -15,20 +15,20 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Strings Strings
<indexterm><primary>Strings</primary></indexterm> <indexterm><primary>Strings</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Character Traits --> <!-- Sect1 01 : Character Traits -->
<!-- Chapter 02 : String Classes --> <!-- Sect1 02 : String Classes -->
<chapter id="manual.strings.string" xreflabel="string"> <sect1 id="std.strings.string" xreflabel="string">
<title>String Classes</title> <title>String Classes</title>
<sect1 id="strings.string.simple" xreflabel="Simple Transformations"> <sect2 id="strings.string.simple" xreflabel="Simple Transformations">
<title>Simple Transformations</title> <title>Simple Transformations</title>
<para> <para>
Here are Standard, simple, and portable ways to perform common Here are Standard, simple, and portable ways to perform common
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
std::string capital_s; std::string capital_s;
capital_s.resize(s.size()); capital_s.resize(s.size());
std::transform (s.begin(), s.end(), capital_s.begin(), ToUpper()); std::transform (s.begin(), s.end(), capital_s.begin(), ToUpper());
} }
</programlisting> </programlisting>
<para> <para>
<emphasis>Note</emphasis> that these calls all <emphasis>Note</emphasis> that these calls all
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<code>&lt;locale&gt;</code>) so the template-arguments for <code>&lt;locale&gt;</code>) so the template-arguments for
<code>transform&lt;&gt;</code> cannot be deduced, as explained in <code>transform&lt;&gt;</code> cannot be deduced, as explained in
<ulink url="http://gcc.gnu.org/ml/libstdc++/2002-11/msg00180.html">this <ulink url="http://gcc.gnu.org/ml/libstdc++/2002-11/msg00180.html">this
message</ulink>. message</ulink>.
<!-- section 14.8.2.4 clause 16 in ISO 14882:1998 --> <!-- section 14.8.2.4 clause 16 in ISO 14882:1998 -->
At minimum, you can write short wrappers like At minimum, you can write short wrappers like
</para> </para>
...@@ -115,15 +115,15 @@ ...@@ -115,15 +115,15 @@
str.erase(0,notwhite); str.erase(0,notwhite);
// trim trailing whitespace // trim trailing whitespace
notwhite = str.find_last_not_of(" \t\n"); notwhite = str.find_last_not_of(" \t\n");
str.erase(notwhite+1); </programlisting> str.erase(notwhite+1); </programlisting>
<para>Obviously, the calls to <code>find</code> could be inserted directly <para>Obviously, the calls to <code>find</code> could be inserted directly
into the calls to <code>erase</code>, in case your compiler does not into the calls to <code>erase</code>, in case your compiler does not
optimize named temporaries out of existence. optimize named temporaries out of existence.
</para> </para>
</sect1> </sect2>
<sect1 id="strings.string.case" xreflabel="Case Sensitivity"> <sect2 id="strings.string.case" xreflabel="Case Sensitivity">
<title>Case Sensitivity</title> <title>Case Sensitivity</title>
<para> <para>
</para> </para>
...@@ -174,8 +174,8 @@ ...@@ -174,8 +174,8 @@
very good information. very good information.
</para> </para>
</sect1> </sect2>
<sect1 id="strings.string.character_types" xreflabel="Arbitrary Characters"> <sect2 id="strings.string.character_types" xreflabel="Arbitrary Characters">
<title>Arbitrary Character Types</title> <title>Arbitrary Character Types</title>
<para> <para>
</para> </para>
...@@ -193,8 +193,8 @@ ...@@ -193,8 +193,8 @@
</para> </para>
<programlisting> <programlisting>
template &lt;typename CharT, template &lt;typename CharT,
typename Traits = char_traits&lt;CharT&gt;, typename Traits = char_traits&lt;CharT&gt;,
typename Alloc = allocator&lt;CharT&gt; &gt; typename Alloc = allocator&lt;CharT&gt; &gt;
class basic_string { .... };</programlisting> class basic_string { .... };</programlisting>
<para>Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right <para>Now, <code>allocator&lt;CharT&gt;</code> will probably Do The Right
Thing by default, unless you need to implement your own allocator Thing by default, unless you need to implement your own allocator
...@@ -206,11 +206,11 @@ ...@@ -206,11 +206,11 @@
</para> </para>
<programlisting> <programlisting>
template &lt;typename CharT&gt; template &lt;typename CharT&gt;
struct char_traits struct char_traits
{ {
static void foo (type1 x, type2 y); static void foo (type1 x, type2 y);
... ...
};</programlisting> };</programlisting>
<para>and functions such as char_traits&lt;CharT&gt;::foo() are not <para>and functions such as char_traits&lt;CharT&gt;::foo() are not
actually defined anywhere for the general case. The C++ standard actually defined anywhere for the general case. The C++ standard
permits this, because writing such a definition to fit all possible permits this, because writing such a definition to fit all possible
...@@ -245,9 +245,9 @@ ...@@ -245,9 +245,9 @@
(See how tricky this is?) (See how tricky this is?)
</para> </para>
</sect1> </sect2>
<sect1 id="strings.string.token" xreflabel="Tokenizing"> <sect2 id="strings.string.token" xreflabel="Tokenizing">
<title>Tokenizing</title> <title>Tokenizing</title>
<para> <para>
</para> </para>
...@@ -275,32 +275,32 @@ ...@@ -275,32 +275,32 @@
template &lt;typename Container&gt; template &lt;typename Container&gt;
void void
stringtok(Container &amp;container, string const &amp;in, stringtok(Container &amp;container, string const &amp;in,
const char * const delimiters = " \t\n") const char * const delimiters = " \t\n")
{ {
const string::size_type len = in.length(); const string::size_type len = in.length();
string::size_type i = 0; string::size_type i = 0;
while (i &lt; len) while (i &lt; len)
{ {
// Eat leading whitespace // Eat leading whitespace
i = in.find_first_not_of(delimiters, i); i = in.find_first_not_of(delimiters, i);
if (i == string::npos) if (i == string::npos)
return; // Nothing left but white space return; // Nothing left but white space
// Find the end of the token // Find the end of the token
string::size_type j = in.find_first_of(delimiters, i); string::size_type j = in.find_first_of(delimiters, i);
// Push token // Push token
if (j == string::npos) if (j == string::npos)
{ {
container.push_back(in.substr(i)); container.push_back(in.substr(i));
return; return;
} }
else else
container.push_back(in.substr(i, j-i)); container.push_back(in.substr(i, j-i));
// Set up for next loop // Set up for next loop
i = j + 1; i = j + 1;
} }
} }
</programlisting> </programlisting>
...@@ -317,7 +317,7 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -317,7 +317,7 @@ stringtok(Container &amp;container, string const &amp;in,
std::list&lt;string&gt; ls; std::list&lt;string&gt; ls;
stringtok (ls, " this \t is\t\n a test "); stringtok (ls, " this \t is\t\n a test ");
for (std::list&lt;string&gt;const_iterator i = ls.begin(); for (std::list&lt;string&gt;const_iterator i = ls.begin();
i != ls.end(); ++i) i != ls.end(); ++i)
{ {
std::cerr &lt;&lt; ':' &lt;&lt; (*i) &lt;&lt; ":\n"; std::cerr &lt;&lt; ':' &lt;&lt; (*i) &lt;&lt; ":\n";
} </programlisting> } </programlisting>
...@@ -345,8 +345,8 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -345,8 +345,8 @@ stringtok(Container &amp;container, string const &amp;in,
</para> </para>
</sect1> </sect2>
<sect1 id="strings.string.shrink" xreflabel="Shrink to Fit"> <sect2 id="strings.string.shrink" xreflabel="Shrink to Fit">
<title>Shrink to Fit</title> <title>Shrink to Fit</title>
<para> <para>
</para> </para>
...@@ -366,11 +366,11 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -366,11 +366,11 @@ stringtok(Container &amp;container, string const &amp;in,
entry</link>) but the regular copy constructor cannot be used entry</link>) but the regular copy constructor cannot be used
because libstdc++'s <code>string</code> is Copy-On-Write. because libstdc++'s <code>string</code> is Copy-On-Write.
</para> </para>
</sect1>
<sect1 id="strings.string.Cstring" xreflabel="CString (MFC)"> </sect2>
<sect2 id="strings.string.Cstring" xreflabel="CString (MFC)">
<title>CString (MFC)</title> <title>CString (MFC)</title>
<para> <para>
</para> </para>
...@@ -387,16 +387,16 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -387,16 +387,16 @@ stringtok(Container &amp;container, string const &amp;in,
message</ulink>, Joe Buck points out a few very important things: message</ulink>, Joe Buck points out a few very important things:
</para> </para>
<itemizedlist> <itemizedlist>
<listitem><para>The Standard <code>string</code> supports all the operations <listitem><para>The Standard <code>string</code> supports all the operations
that CString does, with three exceptions. that CString does, with three exceptions.
</para></listitem> </para></listitem>
<listitem><para>Two of those exceptions (whitespace trimming and case <listitem><para>Two of those exceptions (whitespace trimming and case
conversion) are trivial to implement. In fact, we do so conversion) are trivial to implement. In fact, we do so
on this page. on this page.
</para></listitem> </para></listitem>
<listitem><para>The third is <code>CString::Format</code>, which allows formatting <listitem><para>The third is <code>CString::Format</code>, which allows formatting
in the style of <code>sprintf</code>. This deserves some mention: in the style of <code>sprintf</code>. This deserves some mention:
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
<para> <para>
The old libg++ library had a function called form(), which did much The old libg++ library had a function called form(), which did much
...@@ -418,11 +418,11 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -418,11 +418,11 @@ stringtok(Container &amp;container, string const &amp;in,
int the_number; int the_number;
incoming_stream &gt;&gt; the_word // extract "foo" incoming_stream &gt;&gt; the_word // extract "foo"
&gt;&gt; the_number; // extract N &gt;&gt; the_number; // extract N
ostringstream output_stream; ostringstream output_stream;
output_stream &lt;&lt; "The word was " &lt;&lt; the_word output_stream &lt;&lt; "The word was " &lt;&lt; the_word
&lt;&lt; " and 3*N was " &lt;&lt; (3*the_number); &lt;&lt; " and 3*N was " &lt;&lt; (3*the_number);
return output_stream.str(); return output_stream.str();
} </programlisting> } </programlisting>
...@@ -432,22 +432,22 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -432,22 +432,22 @@ stringtok(Container &amp;container, string const &amp;in,
<programlisting> <programlisting>
CString suffers from a common programming error that results in CString suffers from a common programming error that results in
poor performance. Consider the following code: poor performance. Consider the following code:
CString n_copies_of (const CString&amp; foo, unsigned n) CString n_copies_of (const CString&amp; foo, unsigned n)
{ {
CString tmp; CString tmp;
for (unsigned i = 0; i &lt; n; i++) for (unsigned i = 0; i &lt; n; i++)
tmp += foo; tmp += foo;
return tmp; return tmp;
} }
This function is O(n^2), not O(n). The reason is that each += This function is O(n^2), not O(n). The reason is that each +=
causes a reallocation and copy of the existing string. Microsoft causes a reallocation and copy of the existing string. Microsoft
applications are full of this kind of thing (quadratic performance applications are full of this kind of thing (quadratic performance
on tasks that can be done in linear time) -- on the other hand, on tasks that can be done in linear time) -- on the other hand,
we should be thankful, as it's created such a big market for high-end we should be thankful, as it's created such a big market for high-end
ix86 hardware. :-) ix86 hardware. :-)
If you replace CString with string in the above function, the If you replace CString with string in the above function, the
performance is O(n). performance is O(n).
</programlisting> </programlisting>
...@@ -455,35 +455,35 @@ stringtok(Container &amp;container, string const &amp;in, ...@@ -455,35 +455,35 @@ stringtok(Container &amp;container, string const &amp;in,
comparing CString and the Standard string class: comparing CString and the Standard string class:
</para> </para>
<itemizedlist> <itemizedlist>
<listitem><para>CString permits access to its internal representation; coders <listitem><para>CString permits access to its internal representation; coders
who exploited that may have problems moving to <code>string</code>. who exploited that may have problems moving to <code>string</code>.
</para></listitem> </para></listitem>
<listitem><para>Microsoft ships the source to CString (in the files <listitem><para>Microsoft ships the source to CString (in the files
MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation MFC\SRC\Str{core,ex}.cpp), so you could fix the allocation
bug and rebuild your MFC libraries. bug and rebuild your MFC libraries.
<emphasis><emphasis>Note:</emphasis> It looks like the CString shipped <emphasis><emphasis>Note:</emphasis> It looks like the CString shipped
with VC++6.0 has fixed this, although it may in fact have been with VC++6.0 has fixed this, although it may in fact have been
one of the VC++ SPs that did it.</emphasis> one of the VC++ SPs that did it.</emphasis>
</para></listitem> </para></listitem>
<listitem><para><code>string</code> operations like this have O(n) complexity <listitem><para><code>string</code> operations like this have O(n) complexity
<emphasis>if the implementors do it correctly</emphasis>. The libstdc++ <emphasis>if the implementors do it correctly</emphasis>. The libstdc++
implementors did it correctly. Other vendors might not. implementors did it correctly. Other vendors might not.
</para></listitem> </para></listitem>
<listitem><para>While parts of the SGI STL are used in libstdc++, their <listitem><para>While chapters of the SGI STL are used in libstdc++, their
string class is not. The SGI <code>string</code> is essentially string class is not. The SGI <code>string</code> is essentially
<code>vector&lt;char&gt;</code> and does not do any reference <code>vector&lt;char&gt;</code> and does not do any reference
counting like libstdc++'s does. (It is O(n), though.) counting like libstdc++'s does. (It is O(n), though.)
So if you're thinking about SGI's string or rope classes, So if you're thinking about SGI's string or rope classes,
you're now looking at four possibilities: CString, the you're now looking at four possibilities: CString, the
libstdc++ string, the SGI string, and the SGI rope, and this libstdc++ string, the SGI string, and the SGI rope, and this
is all before any allocator or traits customizations! (More is all before any allocator or traits customizations! (More
choices than you can shake a stick at -- want fries with that?) choices than you can shake a stick at -- want fries with that?)
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</sect1> </sect2>
</chapter> </sect1>
<!-- Chapter 03 : Interacting with C --> <!-- Sect1 03 : Interacting with C -->
</part> </chapter>
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.support" xreflabel="Support"> <chapter id="std.support" xreflabel="Support">
<?dbhtml filename="support.html"?> <?dbhtml filename="support.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,15 +15,13 @@ ...@@ -15,15 +15,13 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Support Support
<indexterm><primary>Support</primary></indexterm> <indexterm><primary>Support</primary></indexterm>
</title> </title>
<preface>
<title></title>
<para> <para>
This part deals with the functions called and objects created This part deals with the functions called and objects created
automatically during the course of a program's existence. automatically during the course of a program's existence.
...@@ -35,12 +33,11 @@ ...@@ -35,12 +33,11 @@
homepage for help), we can mention a couple of changes in what homepage for help), we can mention a couple of changes in what
kind of support a C++ program gets from the Standard Library. kind of support a C++ program gets from the Standard Library.
</para> </para>
</preface>
<chapter id="manual.support.types" xreflabel="Types"> <sect1 id="std.support.types" xreflabel="Types">
<?dbhtml filename="fundamental_types.html"?> <?dbhtml filename="fundamental_types.html"?>
<title>Types</title> <title>Types</title>
<sect1 id="manual.support.types.fundamental" xreflabel="Fundamental Types"> <sect2 id="std.support.types.fundamental" xreflabel="Fundamental Types">
<title>Fundamental Types</title> <title>Fundamental Types</title>
<para> <para>
C++ has the following builtin types: C++ has the following builtin types:
...@@ -100,9 +97,9 @@ ...@@ -100,9 +97,9 @@
Specializing parts of the library on these types is prohibited: Specializing parts of the library on these types is prohibited:
instead, use a POD. instead, use a POD.
</para> </para>
</sect1> </sect2>
<sect1 id="manual.support.types.numeric_limits" xreflabel="Numeric Properties"> <sect2 id="std.support.types.numeric_limits" xreflabel="Numeric Properties">
<title>Numeric Properties</title> <title>Numeric Properties</title>
...@@ -117,8 +114,8 @@ ...@@ -117,8 +114,8 @@
</para> </para>
<programlisting> <programlisting>
template&lt;typename T&gt; template&lt;typename T&gt;
struct class struct class
{ {
static const bool is_specialized; static const bool is_specialized;
static T max() throw(); static T max() throw();
...@@ -156,9 +153,9 @@ ...@@ -156,9 +153,9 @@
static const float_round_style round_style; static const float_round_style round_style;
}; };
</programlisting> </programlisting>
</sect1> </sect2>
<sect1 id="manual.support.types.null" xreflabel="NULL"> <sect2 id="std.support.types.null" xreflabel="NULL">
<title>NULL</title> <title>NULL</title>
<para> <para>
The only change that might affect people is the type of The only change that might affect people is the type of
...@@ -191,15 +188,15 @@ ...@@ -191,15 +188,15 @@
<constant>NULL</constant> that will match pointers before it <constant>NULL</constant> that will match pointers before it
matches integers. matches integers.
</para> </para>
<para>See <para>See
<ulink url="http://www.awprofessional.com/titles/0-201-31015-5/">the <ulink url="http://www.awprofessional.com/titles/0-201-31015-5/">the
Effective C++ CD example</ulink> Effective C++ CD example</ulink>
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
<chapter id="manual.support.memory" xreflabel="Dynamic Memory"> <sect1 id="std.support.memory" xreflabel="Dynamic Memory">
<?dbhtml filename="dynamic_memory.html"?> <?dbhtml filename="dynamic_memory.html"?>
<title>Dynamic Memory</title> <title>Dynamic Memory</title>
<para> <para>
...@@ -262,8 +259,8 @@ ...@@ -262,8 +259,8 @@
{ {
delete[] safety; delete[] safety;
popup_window ("Dude, you are running low on heap memory. You popup_window ("Dude, you are running low on heap memory. You
should, like, close some windows, or something. should, like, close some windows, or something.
The next time you run out, we're gonna burn!"); The next time you run out, we're gonna burn!");
set_new_handler (old_handler); set_new_handler (old_handler);
return; return;
} }
...@@ -277,14 +274,14 @@ ...@@ -277,14 +274,14 @@
</programlisting> </programlisting>
<para> <para>
<classname>bad_alloc</classname> is derived from the base <classname>exception</classname> <classname>bad_alloc</classname> is derived from the base <classname>exception</classname>
class defined in Chapter 19. class defined in Sect1 19.
</para> </para>
</chapter> </sect1>
<chapter id="manual.support.termination" xreflabel="Termination"> <sect1 id="std.support.termination" xreflabel="Termination">
<?dbhtml filename="termination.html"?> <?dbhtml filename="termination.html"?>
<title>Termination</title> <title>Termination</title>
<sect1 id="support.termination.handlers" xreflabel="Termination Handlers"> <sect2 id="support.termination.handlers" xreflabel="Termination Handlers">
<title>Termination Handlers</title> <title>Termination Handlers</title>
<para> <para>
Not many changes here to <filename Not many changes here to <filename
...@@ -310,32 +307,32 @@ ...@@ -310,32 +307,32 @@
<listitem> <listitem>
<para> <para>
Functions registered with <function>atexit()</function> are called in Functions registered with <function>atexit()</function> are called in
reverse order of registration, once per registration call. reverse order of registration, once per registration call.
(This isn't actually new.) (This isn't actually new.)
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
The previous two actions are <quote>interleaved,</quote> that is, The previous two actions are <quote>interleaved,</quote> that is,
given this pseudocode: given this pseudocode:
</para> </para>
<programlisting> <programlisting>
extern "C or C++" void f1 (void); extern "C or C++" void f1 (void);
extern "C or C++" void f2 (void); extern "C or C++" void f2 (void);
static Thing obj1; static Thing obj1;
atexit(f1); atexit(f1);
static Thing obj2; static Thing obj2;
atexit(f2); atexit(f2);
</programlisting> </programlisting>
<para> <para>
then at a call of <function>exit()</function>, then at a call of <function>exit()</function>,
<varname>f2</varname> will be called, then <varname>f2</varname> will be called, then
<varname>obj2</varname> will be destroyed, then <varname>obj2</varname> will be destroyed, then
<varname>f1</varname> will be called, and finally <varname>f1</varname> will be called, and finally
<varname>obj1</varname> will be destroyed. If <varname>obj1</varname> will be destroyed. If
<varname>f1</varname> or <varname>f2</varname> allow an <varname>f1</varname> or <varname>f2</varname> allow an
exception to propagate out of them, Bad Things happen. exception to propagate out of them, Bad Things happen.
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
...@@ -345,9 +342,9 @@ ...@@ -345,9 +342,9 @@
those slots. If you think you may run out, we recommend using those slots. If you think you may run out, we recommend using
the <function>xatexit</function>/<function>xexit</function> combination from <literal>libiberty</literal>, which has no such limit. the <function>xatexit</function>/<function>xexit</function> combination from <literal>libiberty</literal>, which has no such limit.
</para> </para>
</sect1> </sect2>
<sect1 id="support.termination.verbose" xreflabel="Verbose Terminate Handler"> <sect2 id="support.termination.verbose" xreflabel="Verbose Terminate Handler">
<?dbhtml filename="verbose_termination.html"?> <?dbhtml filename="verbose_termination.html"?>
<title>Verbose Terminate Handler</title> <title>Verbose Terminate Handler</title>
<para> <para>
...@@ -358,7 +355,7 @@ ...@@ -358,7 +355,7 @@
<programlisting> <programlisting>
#include &lt;exception&gt; #include &lt;exception&gt;
int main() int main()
{ {
std::set_terminate(__gnu_cxx::__verbose_terminate_handler); std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
...@@ -390,7 +387,7 @@ int main() ...@@ -390,7 +387,7 @@ int main()
#include &lt;stdexcept&gt; #include &lt;stdexcept&gt;
struct argument_error : public std::runtime_error struct argument_error : public std::runtime_error
{ {
argument_error(const std::string&amp; s): std::runtime_error(s) { } argument_error(const std::string&amp; s): std::runtime_error(s) { }
}; };
...@@ -436,7 +433,7 @@ int main(int argc) ...@@ -436,7 +433,7 @@ int main(int argc)
std::set_terminate(std::abort); std::set_terminate(std::abort);
</programlisting> </programlisting>
<para> <para>
After this, all calls to <function>terminate</function> will use After this, all calls to <function>terminate</function> will use
<function>abort</function> as the terminate handler. <function>abort</function> as the terminate handler.
</para> </para>
...@@ -449,7 +446,7 @@ int main(int argc) ...@@ -449,7 +446,7 @@ int main(int argc)
an unspecified manner. an unspecified manner.
</para> </para>
</sect1> </sect2>
</chapter> </sect1>
</part> </chapter>
...@@ -1042,7 +1042,7 @@ namespace gtk ...@@ -1042,7 +1042,7 @@ namespace gtk
<filename class="headerfile">cstdlib</filename> <filename class="headerfile">cstdlib</filename>
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<filename class="headerfile">exception</filename> <filename class="headerfile">exception</filename>
...@@ -1075,7 +1075,7 @@ namespace gtk ...@@ -1075,7 +1075,7 @@ namespace gtk
</itemizedlist> </itemizedlist>
<para> <para>
In addition, throw in In addition, throw in
</para> </para>
<itemizedlist> <itemizedlist>
...@@ -1103,12 +1103,12 @@ namespace gtk ...@@ -1103,12 +1103,12 @@ namespace gtk
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para> There exists a library that offers runtime support for <para> There exists a library that offers runtime support for
just these headers, and it is called just these headers, and it is called
<filename class="libraryfile">libsupc++.a</filename>. To use it, compile with <command>gcc</command> instead of <command>g++</command>, like so: <filename class="libraryfile">libsupc++.a</filename>. To use it, compile with <command>gcc</command> instead of <command>g++</command>, like so:
</para> </para>
<para> <para>
<command>gcc foo.cc -lsupc++</command> <command>gcc foo.cc -lsupc++</command>
</para> </para>
...@@ -1501,7 +1501,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) ...@@ -1501,7 +1501,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
this at application run-time this at application run-time
see <link linkend="manual.intro.using.macros">here</link>. Also see <link linkend="manual.intro.using.macros">here</link>. Also
useful are details useful are details
on <link linkend="manual.util.memory.allocator">allocator</link> on <link linkend="std.util.memory.allocator">allocator</link>
options and capabilities. options and capabilities.
</para> </para>
......
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
[ ]> [ ]>
<part id="manual.util" xreflabel="Utilities"> <chapter id="std.util" xreflabel="Utilities">
<?dbhtml filename="utilities.html"?> <?dbhtml filename="utilities.html"?>
<partinfo> <chapterinfo>
<keywordset> <keywordset>
<keyword> <keyword>
ISO C++ ISO C++
...@@ -15,28 +15,28 @@ ...@@ -15,28 +15,28 @@
library library
</keyword> </keyword>
</keywordset> </keywordset>
</partinfo> </chapterinfo>
<title> <title>
Utilities Utilities
<indexterm><primary>Utilities</primary></indexterm> <indexterm><primary>Utilities</primary></indexterm>
</title> </title>
<!-- Chapter 01 : Functors --> <!-- Section 01 : Functors -->
<chapter id="manual.util.functors" xreflabel="Functors"> <section id="std.util.functors" xreflabel="Functors">
<?dbhtml filename="functors.html"?> <?dbhtml filename="functors.html"?>
<title>Functors</title> <title>Functors</title>
<para>If you don't know what functors are, you're not alone. Many people <para>If you don't know what functors are, you're not alone. Many people
get slightly the wrong idea. In the interest of not reinventing get slightly the wrong idea. In the interest of not reinventing
the wheel, we will refer you to the introduction to the functor the wheel, we will refer you to the introduction to the functor
concept written by SGI as part of their STL, in concept written by SGI as chapter of their STL, in
<ulink url="http://www.sgi.com/tech/stl/functors.html">their <ulink url="http://www.sgi.com/tech/stl/functors.html">their
http://www.sgi.com/tech/stl/functors.html</ulink>. http://www.sgi.com/tech/stl/functors.html</ulink>.
</para> </para>
</chapter> </section>
<!-- Chapter 02 : Pairs --> <!-- Section 02 : Pairs -->
<chapter id="manual.util.pairs" xreflabel="Pairs"> <section id="std.util.pairs" xreflabel="Pairs">
<?dbhtml filename="pairs.html"?> <?dbhtml filename="pairs.html"?>
<title>Pairs</title> <title>Pairs</title>
<para>The <code>pair&lt;T1,T2&gt;</code> is a simple and handy way to <para>The <code>pair&lt;T1,T2&gt;</code> is a simple and handy way to
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</para> </para>
<programlisting> <programlisting>
x.first &lt; y.first || x.first &lt; y.first ||
( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second ) ( !(y.first &lt; x.first) &amp;&amp; x.second &lt; y.second )
</programlisting> </programlisting>
<para>The other operators are not defined using the <code>rel_ops</code> <para>The other operators are not defined using the <code>rel_ops</code>
functions above, but their semantics are the same. functions above, but their semantics are the same.
...@@ -89,10 +89,10 @@ ...@@ -89,10 +89,10 @@
pair&lt;int,MyClass&gt; p = make_pair(4,myobject); pair&lt;int,MyClass&gt; p = make_pair(4,myobject);
</programlisting> </programlisting>
</chapter> </section>
<!-- Chapter 03 : Memory --> <!-- Section 03 : Memory -->
<chapter id="manual.util.memory" xreflabel="Memory"> <section id="std.util.memory" xreflabel="Memory">
<?dbhtml filename="memory.html"?> <?dbhtml filename="memory.html"?>
<title>Memory</title> <title>Memory</title>
<para> <para>
...@@ -104,28 +104,28 @@ ...@@ -104,28 +104,28 @@
</para> </para>
<!-- Section 01 : allocator --> <!-- Section 01 : allocator -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="allocator.xml"> parse="xml" href="allocator.xml">
</xi:include> </xi:include>
<!-- Section 02 : auto_ptr --> <!-- Section 02 : auto_ptr -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="auto_ptr.xml"> parse="xml" href="auto_ptr.xml">
</xi:include> </xi:include>
<!-- Section 03 : shared_ptr --> <!-- Section 03 : shared_ptr -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
parse="xml" href="shared_ptr.xml"> parse="xml" href="shared_ptr.xml">
</xi:include> </xi:include>
</chapter> </section>
<!-- Chapter 04 : Traits --> <!-- Section 04 : Traits -->
<chapter id="manual.util.traits" xreflabel="Traits"> <section id="std.util.traits" xreflabel="Traits">
<?dbhtml filename="traits.html"?> <?dbhtml filename="traits.html"?>
<title>Traits</title> <title>Traits</title>
<para> <para>
</para> </para>
</chapter> </section>
</part> </chapter>
// Copyright (C) 2007, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
/** @file include/c++0x_warning.h /** @file c++0x_warning.h
* This is a Standard C++ Library header. * This is a Standard C++ Library header.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment