forked from boostorg/core
Move headers to core; add quickbook documentation
This commit is contained in:
+16
-59
@@ -1,62 +1,19 @@
|
||||
# Copyright (c) 2014 Glen Joseph Fernandes
|
||||
# glenfe at live dot com
|
||||
#
|
||||
# Distributed under the Boost Software License,
|
||||
# Version 1.0. (See accompanying file LICENSE_1_0.txt
|
||||
# or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# Copyright John Maddock 2005. Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
import quickbook ;
|
||||
|
||||
project : requirements
|
||||
# Path for links to Boost:
|
||||
<xsl:param>boost.root=../../../..
|
||||
xml core : core.qbk ;
|
||||
|
||||
# Some general style settings:
|
||||
<xsl:param>table.footnote.number.format=1
|
||||
<xsl:param>footnote.number.format=1
|
||||
|
||||
# HTML options first:
|
||||
# Use graphics not text for navigation:
|
||||
<xsl:param>navig.graphics=1
|
||||
# PDF Options:
|
||||
# TOC Generation: this is needed for FOP-0.9 and later:
|
||||
<xsl:param>fop1.extensions=0
|
||||
<xsl:param>xep.extensions=1
|
||||
# TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
|
||||
<xsl:param>fop.extensions=0
|
||||
# No indent on body text:
|
||||
<xsl:param>body.start.indent=0pt
|
||||
# Margin size:
|
||||
<xsl:param>page.margin.inner=0.5in
|
||||
# Margin size:
|
||||
<xsl:param>page.margin.outer=0.5in
|
||||
# Paper type = A4
|
||||
<xsl:param>paper.type=A4
|
||||
# Yes, we want graphics for admonishments:
|
||||
<xsl:param>admon.graphics=1
|
||||
# Set this one for PDF generation *only*:
|
||||
# default pnd graphics are awful in PDF form,
|
||||
# better use SVG's instead:
|
||||
<format>pdf:<xsl:param>admon.graphics.extension=".svg"
|
||||
<format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/core/doc/html
|
||||
;
|
||||
|
||||
using quickbook ;
|
||||
|
||||
path-constant boost-images : ../../../doc/src/images ;
|
||||
|
||||
xml explicit_operator_bool : explicit_operator_bool.qbk ;
|
||||
boostbook standalone_explicit_operator_bool
|
||||
:
|
||||
explicit_operator_bool
|
||||
:
|
||||
# File name of HTML output:
|
||||
<xsl:param>root.filename=explicit_operator_bool
|
||||
# How far down we chunk nested sections, basically all of them:
|
||||
<xsl:param>chunk.section.depth=0
|
||||
# Don't put the first section on the same page as the TOC:
|
||||
<xsl:param>chunk.first.sections=0
|
||||
# How far down sections get TOC's
|
||||
<xsl:param>toc.section.depth=1
|
||||
# Max depth in each TOC:
|
||||
<xsl:param>toc.max.depth=1
|
||||
# How far down we go with TOC's
|
||||
<xsl:param>generate.section.toc.level=1
|
||||
;
|
||||
boostbook standalone
|
||||
:
|
||||
core
|
||||
:
|
||||
<xsl:param>boost.root=http://boost.org/doc/libs/master
|
||||
<xsl:param>generate.section.toc.level=1
|
||||
<xsl:param>toc.max.depth=1
|
||||
;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[section:addressof Header <boost/core/addressof.hpp>]
|
||||
|
||||
The header `<boost/core/addressof.hpp>` defines the function
|
||||
template `boost::addressof`. `boost::addressof(x)` returns the
|
||||
address of `x`. Ordinarily, this address can be obtained by
|
||||
`&x`, but the unary `&` operator can be overloaded.
|
||||
|
||||
`boost::addressof` was originally contributed by Brad King
|
||||
based on ideas from discussion with Doug Gregor.
|
||||
|
||||
[endsect]
|
||||
@@ -0,0 +1,79 @@
|
||||
[library Boost.Core
|
||||
[quickbook 1.5]
|
||||
[id core]
|
||||
[copyright 2014 Peter Dimov]
|
||||
[copyright 2014 Glen Fernandes]
|
||||
[copyright 2014 Andrey Semashev]
|
||||
[dirname core]
|
||||
[license Distributed under the
|
||||
[@http://boost.org/LICENSE_1_0.txt Boost Software License,
|
||||
Version 1.0].
|
||||
]
|
||||
]
|
||||
|
||||
[section Introduction]
|
||||
|
||||
The Boost.Core library is a collection of core utilities. The
|
||||
criteria for inclusion is that the utility component be:
|
||||
|
||||
* simple,
|
||||
* used by other Boost libraries, and
|
||||
* not dependent on any other Boost modules except Core
|
||||
itself, Config, Assert, Static Assert, or Predef.
|
||||
|
||||
Currently, the Core library contains:
|
||||
|
||||
[table
|
||||
[[Component][Utilities]]
|
||||
[
|
||||
[[link core.addressof addressof]]
|
||||
[`boost::addressof`]
|
||||
]
|
||||
[
|
||||
[[@../../checked_delete.html checked_delete]]
|
||||
[`boost::checked_delete`]
|
||||
]
|
||||
[
|
||||
[[@../../enable_if.html enable_if]]
|
||||
[`boost::enable_if`]
|
||||
]
|
||||
[
|
||||
[[link core.lightweight_test lightweight_test]]
|
||||
[`BOOST_TEST, BOOST_ERROR, BOOST_TEST_EQ, BOOST_TEST_NE,
|
||||
BOOST_TEST_THROWS, boost::report_errors`]
|
||||
]
|
||||
[
|
||||
[[link core.no_exceptions_support no_exceptions_support]]
|
||||
[`BOOST_TRY, BOOST_CATCH, BOOST_CATCH_END, BOOST_RETHROW`]
|
||||
]
|
||||
[
|
||||
[[link core.noncopyable noncopyable]]
|
||||
[`boost::noncopyable`]
|
||||
]
|
||||
[
|
||||
[ref]
|
||||
[`boost::ref`]
|
||||
]
|
||||
[
|
||||
[[@../../swap.html swap]]
|
||||
[`boost::swap`]
|
||||
]
|
||||
[
|
||||
[null_deleter]
|
||||
[`boost::null_deleter`]
|
||||
]
|
||||
[
|
||||
[[link core.explicit_operator_bool explicit_operator_bool]]
|
||||
[`BOOST_EXPLICIT_OPERATOR_BOOL,
|
||||
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT,
|
||||
BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL`]
|
||||
]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
||||
[include:core addressof.qbk]
|
||||
[include:core explicit_operator_bool.qbk]
|
||||
[include:core lightweight_test.qbk]
|
||||
[include:core no_exceptions_support.qbk]
|
||||
[include:core noncopyable.qbk]
|
||||
@@ -1,3 +1,5 @@
|
||||
[section:explicit_operator_bool Header <boost/core/explicit_operator_bool.hpp>]
|
||||
|
||||
[/
|
||||
/ Copyright (c) 2013 Andrey Semashev
|
||||
/
|
||||
@@ -5,17 +7,6 @@
|
||||
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
/]
|
||||
|
||||
[article BOOST_EXPLICIT_OPERATOR_BOOL, BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT and BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL
|
||||
[quickbook 1.5]
|
||||
[authors [Semashev, Andrey]]
|
||||
[copyright 2013 Andrey Semashev]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
[@http://www.boost.org/LICENSE_1_0.txt])
|
||||
]
|
||||
]
|
||||
|
||||
[/===============]
|
||||
[section Overview]
|
||||
[/===============]
|
||||
@@ -24,7 +15,6 @@
|
||||
|
||||
[endsect]
|
||||
|
||||
|
||||
[/===============]
|
||||
[section Examples]
|
||||
[/===============]
|
||||
@@ -62,3 +52,5 @@ Now `my_ptr` can be used in conditional expressions, similarly to a regular poin
|
||||
* The macro was extracted from Boost.Log.
|
||||
|
||||
[endsect]
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
[section:lightweight_test Header <boost/core/lightweight_test.hpp>]
|
||||
|
||||
If expression is false increases the error count and outputs a
|
||||
message containing `expression`.
|
||||
|
||||
``
|
||||
BOOST_TEST(expression)
|
||||
``
|
||||
|
||||
Increases error count and outputs a message containing
|
||||
`message`.
|
||||
|
||||
``
|
||||
BOOST_ERROR(message)
|
||||
``
|
||||
|
||||
If `expr1` != `expr2` increases the error count and outputs a
|
||||
message containing both expressions.
|
||||
|
||||
``
|
||||
BOOST_TEST_EQ(expr1, expr2)
|
||||
``
|
||||
|
||||
If `expr1` == `expr2` increases the error count and outputs a
|
||||
message containing both expressions.
|
||||
|
||||
``
|
||||
BOOST_TEST_NE(expr1, expr2)
|
||||
``
|
||||
|
||||
If BOOST_NO_EXCEPTIONS is NOT defined and if `expr` does not
|
||||
throw an exception of type `excep`, increases the error count
|
||||
and outputs a message containing the expression.
|
||||
|
||||
If BOOST_NO_EXCEPTIONS is defined, this macro expands to
|
||||
nothing and `expr` is not evaluated.
|
||||
|
||||
``
|
||||
BOOST_TEST_THROWS(expr, excep)
|
||||
``
|
||||
|
||||
Returns the error count.
|
||||
|
||||
``
|
||||
int boost::report_errors()
|
||||
``
|
||||
|
||||
[endsect]
|
||||
@@ -0,0 +1,50 @@
|
||||
[section:no_exceptions_support Header <boost/core/no_exceptions_support.hpp>]
|
||||
|
||||
Example of use:
|
||||
|
||||
``
|
||||
void foo() {
|
||||
BOOST_TRY {
|
||||
...
|
||||
} BOOST_CATCH(const std::bad_alloc&) {
|
||||
...
|
||||
BOOST_RETHROW
|
||||
} BOOST_CATCH(const std::exception& e) {
|
||||
...
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
}
|
||||
``
|
||||
|
||||
With exception support enabled it will expand into:
|
||||
|
||||
``
|
||||
void foo() {
|
||||
{ try {
|
||||
...
|
||||
} catch (const std::bad_alloc&) {
|
||||
...
|
||||
throw;
|
||||
} catch (const std::exception& e) {
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
``
|
||||
|
||||
With exception support disabled it will expand into:
|
||||
|
||||
``
|
||||
void foo() {
|
||||
{ if(true) {
|
||||
...
|
||||
} else if (false) {
|
||||
...
|
||||
} else if (false) {
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
``
|
||||
|
||||
[endsect]
|
||||
@@ -0,0 +1,13 @@
|
||||
[section:noncopyable Header <boost/core/noncopyable.hpp>]
|
||||
|
||||
The header `<boost/noncopyable.hpp>` defines the class
|
||||
`boost::noncopyable`. It is intended to be used as a private
|
||||
base. `boost::noncopyable` has private (under C++03) or
|
||||
deleted (under C++11) copy constructor and a copy assignment
|
||||
operator and can't be copied or assigned; a class that derives
|
||||
from it inherits these properties.
|
||||
|
||||
`boost::noncopyable` was originally contributed by Dave
|
||||
Abrahams.
|
||||
|
||||
[endsect]
|
||||
Reference in New Issue
Block a user