|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-08-15 22:41:20
Author: eric_niebler
Date: 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
New Revision: 48169
URL: http://svn.boost.org/trac/boost/changeset/48169
Log:
merged from trunk
Added:
branches/proto/v4/libs/proto/doc/conventions.qbk
- copied unchanged from r48168, /trunk/libs/proto/doc/conventions.qbk
branches/proto/v4/libs/proto/doc/hello_world.qbk
- copied unchanged from r48168, /trunk/libs/proto/doc/hello_world.qbk
branches/proto/v4/libs/proto/doc/resources.qbk
- copied unchanged from r48168, /trunk/libs/proto/doc/resources.qbk
branches/proto/v4/tools/release/build_docs.sh
- copied unchanged from r48168, /trunk/tools/release/build_docs.sh
branches/proto/v4/tools/release/build_release.sh
- copied unchanged from r48168, /trunk/tools/release/build_release.sh
branches/proto/v4/tools/release/build_release_packages.sh
- copied unchanged from r48168, /trunk/tools/release/build_release_packages.sh
branches/proto/v4/tools/release/load_posix.sh
- copied unchanged from r48168, /trunk/tools/release/load_posix.sh
branches/proto/v4/tools/release/load_windows.sh
- copied unchanged from r48168, /trunk/tools/release/load_windows.sh
Removed:
branches/proto/v4/libs/proto/doc/quick_start.qbk
Properties modified:
branches/proto/v4/ (props changed)
Text files modified:
branches/proto/v4/boost/spirit/home/classic/iterator/position_iterator.hpp | 3
branches/proto/v4/boost/spirit/home/support/char_class/iso8859_1.hpp | 120 ++++++++++++++++----------------
branches/proto/v4/boost/tr1/random.hpp | 2
branches/proto/v4/boost/units/homogeneous_system.hpp | 2
branches/proto/v4/boost/unordered_map.hpp | 4
branches/proto/v4/boost/unordered_set.hpp | 4
branches/proto/v4/boost/xpressive/detail/utility/hash_peek_bitset.hpp | 5 +
branches/proto/v4/boost/xpressive/regex_compiler.hpp | 11 ++
branches/proto/v4/libs/maintainers.txt | 1
branches/proto/v4/libs/proto/doc/calculator.qbk | 4
branches/proto/v4/libs/proto/doc/construction.qbk | 63 +++++++++-------
branches/proto/v4/libs/proto/doc/evaluation.qbk | 2
branches/proto/v4/libs/proto/doc/extensibility.qbk | 137 +++++++++++++++++++++---------------
branches/proto/v4/libs/proto/doc/glossary.qbk | 112 +++++++++++++++++------------
branches/proto/v4/libs/proto/doc/grammars.qbk | 8 +
branches/proto/v4/libs/proto/doc/history.qbk | 4 +
branches/proto/v4/libs/proto/doc/preface.qbk | 79 +++++++++------------
branches/proto/v4/libs/proto/doc/proto.qbk | 12 +-
branches/proto/v4/libs/proto/doc/transforms.qbk | 89 +++++++++++++----------
branches/proto/v4/libs/tr1/test/run_random.cpp | 2
branches/proto/v4/libs/unordered/doc/changes.qbk | 5 +
branches/proto/v4/libs/unordered/doc/intro.qbk | 2
branches/proto/v4/libs/unordered/doc/ref.xml | 16 ++--
branches/proto/v4/libs/unordered/test/unordered/compile_tests.hpp | 2
branches/proto/v4/libs/xpressive/test/regress.txt | 10 ++
branches/proto/v4/more/getting_started/detail/build-from-source-head.rst | 2
branches/proto/v4/more/getting_started/index.html | 7 +
branches/proto/v4/more/getting_started/index.rst | 10 ++
branches/proto/v4/more/getting_started/unix-variants.html | 29 ++++---
branches/proto/v4/more/getting_started/unix-variants.rst | 7 +
branches/proto/v4/more/getting_started/windows.html | 148 +++++++++++++++++++++------------------
branches/proto/v4/more/getting_started/windows.rst | 53 ++++++++++----
branches/proto/v4/status/explicit-failures-markup.xml | 13 +++
branches/proto/v4/tools/quickbook/test/templates.gold | 141 +++++++++++++++++++------------------
34 files changed, 631 insertions(+), 478 deletions(-)
Modified: branches/proto/v4/boost/spirit/home/classic/iterator/position_iterator.hpp
==============================================================================
--- branches/proto/v4/boost/spirit/home/classic/iterator/position_iterator.hpp (original)
+++ branches/proto/v4/boost/spirit/home/classic/iterator/position_iterator.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -289,8 +289,7 @@
OtherDerivedT const &rhs = static_cast<OtherDerivedT const &>(x);
bool x_is_end = rhs._isend;
- return (_isend && x_is_end) ||
- (!_isend && !x_is_end && this->base() == rhs.base());
+ return (_isend && x_is_end) || (this->base() == rhs.base());
}
protected:
Modified: branches/proto/v4/boost/spirit/home/support/char_class/iso8859_1.hpp
==============================================================================
--- branches/proto/v4/boost/spirit/home/support/char_class/iso8859_1.hpp (original)
+++ branches/proto/v4/boost/spirit/home/support/char_class/iso8859_1.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -491,69 +491,69 @@
/* ½ 189 bd */ '\0',
/* ¾ 190 be */ '\0',
/* ¿ 191 bf */ '\0',
- /* à 192 c0 */ 0xc0,
- /* á 193 c1 */ 0xc1,
- /* â 194 c2 */ 0xc2,
- /* ã 195 c3 */ 0xc3,
- /* ä 196 c4 */ 0xc4,
- /* å 197 c5 */ 0xc5,
- /* æ 198 c6 */ 0xc6,
- /* ç 199 c7 */ 0xc7,
- /* è 200 c8 */ 0xc8,
- /* é 201 c9 */ 0xc9,
- /* ê 202 ca */ 0xca,
- /* ë 203 cb */ 0xcb,
- /* ì 204 cc */ 0xcc,
- /* í 205 cd */ 0xcd,
- /* î 206 ce */ 0xce,
- /* ï 207 cf */ 0xcf,
- /* ð 208 d0 */ 0xd0,
- /* ñ 209 d1 */ 0xd1,
- /* ò 210 d2 */ 0xd2,
- /* ó 211 d3 */ 0xd3,
- /* ô 212 d4 */ 0xd4,
- /* õ 213 d5 */ 0xd5,
- /* ö 214 d6 */ 0xd6,
+ /* à 192 c0 */ 0xe0,
+ /* á 193 c1 */ 0xe1,
+ /* â 194 c2 */ 0xe2,
+ /* ã 195 c3 */ 0xe3,
+ /* ä 196 c4 */ 0xe4,
+ /* å 197 c5 */ 0xe5,
+ /* æ 198 c6 */ 0xe6,
+ /* ç 199 c7 */ 0xe7,
+ /* è 200 c8 */ 0xe8,
+ /* é 201 c9 */ 0xe9,
+ /* ê 202 ca */ 0xea,
+ /* ë 203 cb */ 0xeb,
+ /* ì 204 cc */ 0xec,
+ /* í 205 cd */ 0xed,
+ /* î 206 ce */ 0xee,
+ /* ï 207 cf */ 0xef,
+ /* ð 208 d0 */ 0xf0,
+ /* ñ 209 d1 */ 0xf1,
+ /* ò 210 d2 */ 0xf2,
+ /* ó 211 d3 */ 0xf3,
+ /* ô 212 d4 */ 0xf4,
+ /* õ 213 d5 */ 0xf5,
+ /* ö 214 d6 */ 0xf6,
/* × 215 d7 */ '\0',
- /* ø 216 d8 */ 0xd8,
- /* ù 217 d9 */ 0xd9,
- /* ú 218 da */ 0xda,
- /* û 219 db */ 0xdb,
- /* ü 220 dc */ 0xdc,
- /* ý 221 dd */ 0xdd,
- /* þ 222 de */ 0xde,
+ /* ø 216 d8 */ 0xf8,
+ /* ù 217 d9 */ 0xf9,
+ /* ú 218 da */ 0xfa,
+ /* û 219 db */ 0xfb,
+ /* ü 220 dc */ 0xfc,
+ /* ý 221 dd */ 0xfd,
+ /* þ 222 de */ 0xfe,
/* ß 223 df */ '\0',
- /* À 224 e0 */ 0xe0,
- /* Á 225 e1 */ 0xe1,
- /* Â 226 e2 */ 0xe2,
- /* Ã 227 e3 */ 0xe3,
- /* Ä 228 e4 */ 0xe4,
- /* Å 229 e5 */ 0xe5,
- /* Æ 230 e6 */ 0xe6,
- /* Ç 231 e7 */ 0xe7,
- /* È 232 e8 */ 0xe8,
- /* É 233 e9 */ 0xe9,
- /* Ê 234 ea */ 0xea,
- /* Ë 235 eb */ 0xeb,
- /* Ì 236 ec */ 0xec,
- /* Í 237 ed */ 0xed,
- /* Î 238 ee */ 0xee,
- /* Ï 239 ef */ 0xef,
- /* Ð 240 f0 */ 0xf0,
- /* Ñ 241 f1 */ 0xf1,
- /* Ò 242 f2 */ 0xf2,
- /* Ó 243 f3 */ 0xf3,
- /* Ô 244 f4 */ 0xf4,
- /* Õ 245 f5 */ 0xf5,
- /* Ö 246 f6 */ 0xf6,
+ /* À 224 e0 */ 0xc0,
+ /* Á 225 e1 */ 0xc1,
+ /* Â 226 e2 */ 0xc2,
+ /* Ã 227 e3 */ 0xc3,
+ /* Ä 228 e4 */ 0xc4,
+ /* Å 229 e5 */ 0xc5,
+ /* Æ 230 e6 */ 0xc6,
+ /* Ç 231 e7 */ 0xc7,
+ /* È 232 e8 */ 0xc8,
+ /* É 233 e9 */ 0xc9,
+ /* Ê 234 ea */ 0xca,
+ /* Ë 235 eb */ 0xcb,
+ /* Ì 236 ec */ 0xcc,
+ /* Í 237 ed */ 0xcd,
+ /* Î 238 ee */ 0xce,
+ /* Ï 239 ef */ 0xcf,
+ /* Ð 240 f0 */ 0xd0,
+ /* Ñ 241 f1 */ 0xd1,
+ /* Ò 242 f2 */ 0xd2,
+ /* Ó 243 f3 */ 0xd3,
+ /* Ô 244 f4 */ 0xd4,
+ /* Õ 245 f5 */ 0xd5,
+ /* Ö 246 f6 */ 0xd6,
/* ÷ 247 f7 */ '\0',
- /* Ø 248 f8 */ 0xf8,
- /* Ù 249 f9 */ 0xf9,
- /* Ú 250 fa */ 0xfa,
- /* Û 251 fb */ 0xfb,
- /* Ü 252 fc */ 0xfc,
- /* Ý 253 fd */ 0xfd,
- /* Þ 254 fe */ 0xfe,
+ /* Ø 248 f8 */ 0xd8,
+ /* Ù 249 f9 */ 0xd9,
+ /* Ú 250 fa */ 0xda,
+ /* Û 251 fb */ 0xdb,
+ /* Ü 252 fc */ 0xdc,
+ /* Ý 253 fd */ 0xdd,
+ /* Þ 254 fe */ 0xde,
/* ÿ 255 ff */ '\0',
};
Modified: branches/proto/v4/boost/tr1/random.hpp
==============================================================================
--- branches/proto/v4/boost/tr1/random.hpp (original)
+++ branches/proto/v4/boost/tr1/random.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -133,7 +133,7 @@
// constructors and member function
mersenne_twister(){}
explicit mersenne_twister(unsigned long value)
- : m_gen(value == 0 ? 4357UL : value){}
+ : m_gen(value == 0 ? 5489UL : value){}
template<class Gen> mersenne_twister(Gen& g)
{
init1(g, ::boost::is_same<mersenne_twister,Gen>());
Modified: branches/proto/v4/boost/units/homogeneous_system.hpp
==============================================================================
--- branches/proto/v4/boost/units/homogeneous_system.hpp (original)
+++ branches/proto/v4/boost/units/homogeneous_system.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -18,7 +18,7 @@
#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
-#include <boost/is_same.hpp>
+#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/not.hpp>
#include <boost/units/detail/linear_algebra.hpp>
Modified: branches/proto/v4/boost/unordered_map.hpp
==============================================================================
--- branches/proto/v4/boost/unordered_map.hpp (original)
+++ branches/proto/v4/boost/unordered_map.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -237,7 +237,7 @@
}
template <class... Args>
- iterator emplace(const_iterator hint, Args&&... args)
+ iterator emplace_hint(const_iterator hint, Args&&... args)
{
return iterator(base.insert_hint(get(hint), std::forward<Args>(args)...));
}
@@ -625,7 +625,7 @@
}
template <class... Args>
- iterator emplace(const_iterator hint, Args&&... args)
+ iterator emplace_hint(const_iterator hint, Args&&... args)
{
return iterator(base.insert_hint(get(hint), std::forward<Args>(args)...));
}
Modified: branches/proto/v4/boost/unordered_set.hpp
==============================================================================
--- branches/proto/v4/boost/unordered_set.hpp (original)
+++ branches/proto/v4/boost/unordered_set.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -233,7 +233,7 @@
}
template <class... Args>
- iterator emplace(const_iterator hint, Args&&... args)
+ iterator emplace_hint(const_iterator hint, Args&&... args)
{
return iterator(
base.insert_hint(get(hint), std::forward<Args>(args)...));
@@ -592,7 +592,7 @@
}
template <class... Args>
- iterator emplace(const_iterator hint, Args&&... args)
+ iterator emplace_hint(const_iterator hint, Args&&... args)
{
return iterator(base.insert_hint(get(hint), std::forward<Args>(args)...));
}
Modified: branches/proto/v4/boost/xpressive/detail/utility/hash_peek_bitset.hpp
==============================================================================
--- branches/proto/v4/boost/xpressive/detail/utility/hash_peek_bitset.hpp (original)
+++ branches/proto/v4/boost/xpressive/detail/utility/hash_peek_bitset.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -104,7 +104,10 @@
void set_bitset(hash_peek_bitset<Char> const &that)
{
- this->bset_ |= that.bset_;
+ if(this->test_icase_(that.icase()))
+ {
+ this->bset_ |= that.bset_;
+ }
}
void set_charset(basic_chset_8bit<Char> const &that, bool icase)
Modified: branches/proto/v4/boost/xpressive/regex_compiler.hpp
==============================================================================
--- branches/proto/v4/boost/xpressive/regex_compiler.hpp (original)
+++ branches/proto/v4/boost/xpressive/regex_compiler.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -23,6 +23,8 @@
#include <boost/mpl/assert.hpp>
#include <boost/throw_exception.hpp>
#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/utility/enable_if.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/xpressive/basic_regex.hpp>
#include <boost/xpressive/detail/dynamic/parser.hpp>
@@ -111,7 +113,8 @@
/// \throw regex_error when the range of characters has invalid regular
/// expression syntax.
template<typename InputIter>
- basic_regex<BidiIter> compile(InputIter begin, InputIter end, flag_type flags = regex_constants::ECMAScript)
+ basic_regex<BidiIter>
+ compile(InputIter begin, InputIter end, flag_type flags = regex_constants::ECMAScript)
{
typedef typename iterator_category<InputIter>::type category;
return this->compile_(begin, end, flags, category());
@@ -120,14 +123,16 @@
/// \overload
///
template<typename InputRange>
- basic_regex<BidiIter> compile(InputRange const &pat, flag_type flags = regex_constants::ECMAScript)
+ typename disable_if<is_pointer<InputRange>, basic_regex<BidiIter> >::type
+ compile(InputRange const &pat, flag_type flags = regex_constants::ECMAScript)
{
return this->compile(boost::begin(pat), boost::end(pat), flags);
}
/// \overload
///
- basic_regex<BidiIter> compile(char_type const *begin, flag_type flags = regex_constants::ECMAScript)
+ basic_regex<BidiIter>
+ compile(char_type const *begin, flag_type flags = regex_constants::ECMAScript)
{
BOOST_ASSERT(0 != begin);
char_type const *end = begin + std::char_traits<char_type>::length(begin);
Modified: branches/proto/v4/libs/maintainers.txt
==============================================================================
--- branches/proto/v4/libs/maintainers.txt (original)
+++ branches/proto/v4/libs/maintainers.txt 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -53,6 +53,7 @@
numeric/interval Sylvain Pion <Sylvain.Pion -at- sophia.inria.fr>, Herve Bronnimann <hbr -at- poly.edu>, Guillaume Melquiond <guillaume.melquiond -at- ens-lyon.fr>
numeric/ublas Michael Stevens <michael -at- michael-stevens.de>
optional Fernando Cacciola <fernando_cacciola -at- ciudad.com.ar>
+operators Daniel Frey <d.frey -at- gmx.de>
parameter David Abrahams <dave -at- boost-consulting.com>, Daniel Wallin <dalwan01 -at- student.umu.se>
pool Stephen Cleary <scleary -at- jerviswebb.com>
preprocessor Paul Mensonides <pmenso57 -at- comcast.net>
Modified: branches/proto/v4/libs/proto/doc/calculator.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/calculator.qbk (original)
+++ branches/proto/v4/libs/proto/doc/calculator.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -30,7 +30,7 @@
struct placeholder
{};
- // Define the Proto-ified placeholder terminals
+ // Define the Protofied placeholder terminals
proto::terminal<placeholder<0> >::type const _1 = {{}};
proto::terminal<placeholder<1> >::type const _2 = {{}};
@@ -178,7 +178,7 @@
All that remains to be done is to put our placeholders in the calculator domain. We
do that by wrapping them in our `calculator<>` wrapper, as below:
- // Define the Proto-ified placeholder terminals, in the
+ // Define the Protofied placeholder terminals, in the
// calculator domain.
calculator<proto::terminal<placeholder<0> >::type> const _1;
calculator<proto::terminal<placeholder<1> >::type> const _2;
Modified: branches/proto/v4/libs/proto/doc/construction.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/construction.qbk (original)
+++ branches/proto/v4/libs/proto/doc/construction.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -5,7 +5,7 @@
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/]
-[def __implelemtation_defined__ [~implementation-defined]]
+[def __unspecified__ [~unspecified]]
[/=======================================================================================]
[section:expression_construction Expression Construction: Building Proto Expression Trees]
@@ -18,14 +18,16 @@
In the calculator example, we defined a placeholder terminal like this:
// Define a placeholder type
- struct placeholder1 {};
+ template<int I>
+ struct placeholder
+ {};
- // Define the Proto-ified placeholder terminal
- proto::terminal< placeholder1 >::type const _1 = {{}};
+ // Define the Protofied placeholder terminal
+ proto::terminal< placeholder<0> >::type const _1 = {{}};
The actual type of `_1` looks like this:
- proto::expr< proto::tag::terminal, proto::term< placeholder1 >, 0 >
+ proto::expr< proto::tag::terminal, proto::term< placeholder<0> >, 0 >
The _expr_ template is the most important type in Proto. Although you will
rarely need to deal with it directly, it's always there behind the scenes
@@ -35,8 +37,8 @@
The _expr_ template makes up the nodes in expression trees. The first template
parameter is the node type; in this case, `proto::tag::terminal`. That means
that `_1` is a leaf-node in the expression tree. The second template parameter
-is a list of child types, or in the case of terminals, the type of the terminal's
-value. Terminals will always have only one type in the type list. The last
+is a list of child types, or in the case of terminals, the terminal's value
+type. Terminals will always have only one type in the type list. The last
parameter is the arity of the expression. Terminals have arity 0, unary
expressions have arity 1, etc.
@@ -58,8 +60,8 @@
['aggregate initialization], with curly braces. In our example, `_1` is
initialized with the initializer `{{}}`. The outer braces is the initializer
for the _expr_ struct, and the inner braces are for the member `_1.child0` which
-is of type `placeholder1`. Note that we use braces to initialize `_1.child0`
-because `placeholder1` is also an aggregate.
+is of type `placeholder<0>`. Note that we use braces to initialize `_1.child0`
+because `placeholder<0>` is also an aggregate.
[/=================================]
[heading Proto's Operator Overloads]
@@ -132,11 +134,11 @@
code works and does what you might expect, but not in the obvious way:
typedef
- proto::terminal< placeholder1 >::type
- placeholder1_type;
+ proto::terminal< placeholder<0> >::type
+ _1_type;
- placeholder1_type const _1 = {{}};
- placeholder1_type const * p = &_1; // OK, &_1 implicitly converted
+ _1_type const _1 = {{}};
+ _1_type const * p = &_1; // OK, &_1 implicitly converted
[/================================]
[heading Building Expression Trees]
@@ -156,7 +158,7 @@
, proto::list1<
proto::expr<
proto::tag::terminal
- , proto::term< placeholder1 >
+ , proto::term< placeholder<0> >
, 0
> const &
>
@@ -173,7 +175,7 @@
, proto::list2<
proto::expr<
proto::tag::terminal
- , proto::term< placeholder1 >
+ , proto::term< placeholder<0> >
, 0
> const &
, proto::expr<
@@ -196,10 +198,10 @@
it is held by reference, ['even if it is a temporary object]. This last
point becomes important later.
# Non-Proto expressions, such as the integer literal, are turned into Proto
- expressions by making them Proto terminals. These terminal expressions
- are thenselves held by reference, but the object itself /is/. Notice that
- the type of the Proto-ified `42` literal is `int const &` -- held by
- reference.
+ expressions by wrapping them in new `expr<>` terminal objects. These new
+ wrappers are not themselves held by reference, but the object wrapped /is/.
+ Notice that the type of the Protofied `42` literal is `int const &` -- held
+ by reference.
The types make it clear: everything in a Proto expression tree is held by
reference. That means that building an expression tree is exceptionally cheap.
@@ -238,7 +240,7 @@
return typename proto::result_of::tag_of<Expr>::type();
}
- proto::terminal<int>::type const i = {0};
+ proto::terminal<int>::type const i = {42};
// Addition nodes have the "plus" tag type:
proto::tag::plus plus_tag = get_tag_of( i + 2 );
@@ -252,7 +254,7 @@
To access them, you can use the _child_c_ function template, as demonstrated
below:
- proto::terminal<int>::type i = {0};
+ proto::terminal<int>::type i = {42};
// Get the 0-th operand of an addition operation:
proto::terminal<int>::type &ri = proto::child_c<0>( i + 2 );
@@ -276,7 +278,7 @@
}
// ...
- terminal<int>::type i = {0};
+ terminal<int>::type i = {42};
test_result_of_child_c( i + 2 );
However, if you ask for the type of the Nth child of `Expr &` or `Expr const &`
@@ -355,7 +357,11 @@
, display()
);
-The above invocation of `fusion::for_each()` displays the following:
+Recall from the Introduction that types in the `proto::functional` namespace
+define function objects that correspond to Proto's free functions. So
+`proto::functional::value()` creates a function object that is equavalent to
+the `proto::value()` function. The above invocation of `fusion::for_each()`
+displays the following:
[pre
1
@@ -397,7 +403,7 @@
fusion::for_each(
fusion::transform(
proto::flatten(_1 + 2 + 3 + 4)
- , functional::child<>()
+ , proto::functional::value()
)
, display()
);
@@ -417,11 +423,10 @@
[section:tags_and_metafunctions Operator Tags and Metafunctions]
[/=============================================================]
-The following table lists the overloadable C++ operators, the Proto tag types
-for each, and the name of the Proto metafunction for generating the
-corresponding Proto expression types. The metafunctions are also usable as
-grammars for matching such nodes, as well as pass-through transforms, as
-explained in later sections.
+The following table lists the overloadable C++ operators, the Proto tag types for
+each, and the name of the metafunctions for generating the corresponding Proto
+expression types. And as we'll see later, the metafunctions are also usable as
+grammars for matching such nodes, as well as pass-through transforms.
[table Operators, Tags and Metafunctions
[[Operator]
Modified: branches/proto/v4/libs/proto/doc/evaluation.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/evaluation.qbk (original)
+++ branches/proto/v4/libs/proto/doc/evaluation.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -173,7 +173,7 @@
>
struct eval;
- // Handle placeholder1 terminals here...
+ // Handle placeholder terminals here...
template<typename Expr, int I>
struct eval<Expr, proto::tag::terminal, placeholder<I> >
{
Modified: branches/proto/v4/libs/proto/doc/extensibility.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/extensibility.qbk (original)
+++ branches/proto/v4/libs/proto/doc/extensibility.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -15,23 +15,35 @@
[section Domains]
[/==============]
-In the examples we've seen so far, Proto has been used to construct an
-expression tree that either is evaluated with the help of a /context/ or else
-is transformed into some other object. What if you need something else? Take
-our old friend the calculator example. Perhaps we would like to build a
-calculator expression and immediately use it as a function object to a standard
-algorithm, like this:
+In most of the examples we've seen so far, Proto has been used to construct an
+expression tree that either is evaluated with the help of a /context/ or else is
+transformed into some other object. What if you need something else? Take our old
+friend the calculator example. Perhaps we would like to build a calculator
+expression and immediately use it as a function object to a standard algorithm,
+like this:
double data[] = {1., 2., 3., 4.};
- // Use the calculator DSEL to square each element ... FAILS! :-(
+ // Use the calculator DSEL to square each element ... HOW?
std::transform( data, data + 4, data, _1 * _1 );
-This will not compile. The problem is that the object created by the expression
-`_1 * _1` does not meet the `UnaryFunction` requirements of the
-`std::transform()` algorithm. In particular, it doesn't have an `operator()`
-member function that takes a `double` and returns a `double`, like
-`std::transform()` expects. What can we do?
+By default, Proto expressions don't have interesting behaviors of their own.
+They're just trees. In particular, the expression `_1 * _1` won't have an
+`operator()` that takes a double and returns a double, like `std::transform()`
+expects. In the [link boost_proto.users_guide.getting_started.hello_calculator
+Hello Calculator] section, we learned that to make this work, we need to define an
+expression wrapper type that defines the `operator()` member function, and we
+needed to associate the wrapper with the calculator /domain/.
+
+In Proto, the term /domain/ refers to a type that associates expressions in that
+domain to an expression /generator/. The generator is just a function object that
+accepts an expression and does something to it, like wrapping it in an expression
+wrapper.
+
+You can also use a domain to associate expressions with a a grammar. When you
+specify a domain's grammar, Proto ensures that all the expressions it generates in
+that domain conform to the domain's grammar. It does that by disabling any operator
+overloads that would create invalid expressions.
[endsect]
@@ -39,12 +51,6 @@
[section:extends The [^extends<>] Expression Wrapper]
[/==================================================]
-The general idea is to add behaviors to the _expr_ type by wrapping it in a
-class template that you define. This wrapper is associated with a domain. Proto
-will build larger expressions out of your wrapper objects, and you will want
-those objects to also be wrapped. You do that by hooking Proto's expression
-generator for your domain.
-
The first step to giving your calculator expressions extra behaviors is to
define a calculator domain. All expressions within the calculator domain will
be imbued with calculator-ness, as we'll see.
@@ -62,7 +68,9 @@
struct calculator
: proto::extends< Expr, calculator< Expr >, calculator_domain >
{
- typedef proto::extends< Expr, calculator< Expr >, calculator_domain > base_type;
+ typedef
+ proto::extends< Expr, calculator< Expr >, calculator_domain >
+ base_type;
calculator( Expr const &expr = Expr() )
: base_type( expr )
@@ -77,13 +85,21 @@
typedef double result_type;
result_type operator()( double d1 = 0.0, double d2 = 0.0 ) const
{
- calculator_context ctx( d1, d2 );
- return proto::eval(*this, ctx );
+ // As defined in the Hello Calculator section.
+ calculator_context ctx;
+
+ // ctx.args is a vector<double> that holds the values
+ // with which we replace the placeholders (e.g., _1 and _2)
+ // in the expression.
+ ctx.args.push_back( d1 ); // _1 gets the value of d1
+ ctx.args.push_back( d2 ); // _2 gets the value of d2
+
+ return proto::eval(*this, ctx ); // evaluate the expression
}
};
We want calculator expressions to be function objects, so we have to define an
-`operator()` that takes and returns `double`s. The `calculator<>` wrapper above
+`operator()` that takes and returns doubles. The `calculator<>` wrapper above
does that with the help of the _extends_ template. The first template to
_extends_ parameter is the expression type we are extending. The second is the
type of the wrapped expression. The third parameter is the domain that this
@@ -91,24 +107,23 @@
from _extends_ behaves just like the expression type it has extended, with any
additional behaviors you choose to give it.
-Although not strictly necessary in this case, we bring `extends<>::operator=`
-into scope with a `using` declaration. This is really only necessary if you
-want expressions like `_1 = 3` to create a lazily evaluated assignment.
-_extends_ defines the appropriate `operator=` for you, but the
-compiler-generated `calculator<>::operator=` will hide it unless you make it
-available with the `using` declaration.
-
-Note that in the implementation of `calculator<>::operator()`, we evaluate the
-expression with the `calculator_context` we defined earlier. As we saw before,
-the context is what gives the operators their meaning. In the case of the
-calculator, the context is also what defines the meaning of the placeholder
-terminals.
+Although not strictly necessary in this case, we bring `extends<>::operator=` into
+scope with a `using` declaration. This is really only necessary if you want
+expressions like `_1 = 3` to create a lazily evaluated assignment. _extends_
+defines the appropriate `operator=` for you, but the compiler-generated
+`calculator<>::operator=` will hide it unless you make it available with the
+`using` declaration.
+
+Note that in the implementation of `calculator<>::operator()`, we evaluate the
+expression with the `calculator_context` we defined earlier. As we saw before, the
+context is what gives the operators their meaning. In the case of the calculator,
+the context is also what defines the meaning of the placeholder terminals.
-Now that we have defined the `calculator<>` expression wrapper, we need to
-wrap the placeholders to imbue them with calculator-ness:
+Now that we have defined the `calculator<>` expression wrapper, we need to wrap the
+placeholders to imbue them with calculator-ness:
- calculator< proto::terminal< placeholder1 >::type > const _1;
- calculator< proto::terminal< placeholder2 >::type > const _2;
+ calculator< proto::terminal< placeholder<0> >::type > const _1;
+ calculator< proto::terminal< placeholder<1> >::type > const _2;
[endsect]
@@ -116,11 +131,11 @@
[section Expression Generators]
[/============================]
-The last thing that remains to be done is to tell Proto that it needs to wrap
-all of our calculator expressions in our `calculator<>` wrapper. We have
-already wrapped the placeholders, but we want /all/ expressions that involve
-the calculator placeholders to be calculators. We can do that by specifying an
-expression generator when we define our `calculator_domain`, as follows:
+The last thing that remains to be done is to tell Proto that it needs to wrap all
+of our calculator expressions in our `calculator<>` wrapper. We have already
+wrapped the placeholders, but we want /all/ expressions that involve the calculator
+placeholders to be calculators. We can do that by specifying an expression
+generator when we define our `calculator_domain`, as follows:
// Define the calculator_domain we forward-declared above.
// Specify that all expression in this domain should be wrapped
@@ -129,13 +144,16 @@
: proto::domain< proto::generator< calculator > >
{};
-Proto uses domains to generate expressions. After Proto has calculated a new
-expression type, it checks the domains of the child expressions. They must
-match. Assuming they do, Proto creates the new expression and passes it to
-`Domain::make()` for any additional processing. If we don't specify a
-generator, the new expression gets passed through unchanged. But since we've
-specified a generator above, `calculator_domain::make()` returns `calculator<>`
-objects.
+The first template parameter to `proto::domain<>` is the generator. "Generator" is just a fancy name for a function object that accepts an expression and does something to it. `proto::generator<>` is a very simple one --- it wraps an expression in the wrapper you specify. `proto::domain<>` inherits from its generator parameter, so all domains are themselves function objects.
+
+[def __domain__ [~Domain]]
+
+After Proto has calculated a new expression type, it checks the domains of the
+child expressions. They must match. Assuming they do, Proto creates the new
+expression and passes it to `__domain__::operator()` for any additional processing.
+If we don't specify a generator, the new expression gets passed through unchanged.
+But since we've specified a generator above, `calculator_domain::operator()`
+returns `calculator<>` objects.
Now we can use calculator expressions as function objects to STL algorithms, as
follows:
@@ -151,7 +169,7 @@
[section:inhibiting_overloads Controlling Operator Overloads]
[/==========================================================]
-By default, Proto defines every possible operator overload for Proto-ified
+By default, Proto defines every possible operator overload for Protofied
expressions. This makes it simple to bang together a DSEL, and Proto's grammar
building and checking facilities make it simple to detect and report invalid
expressions. In some cases, however, the presence of Proto's promiscuous
@@ -200,9 +218,12 @@
template<typename Expr>
struct eval<Expr, proto::tag::terminal>
{
- typedef typename proto::result_of::child<Expr>::type::value_type result_type;
+ typedef
+ typename proto::result_of::child<Expr>::type::value_type
+ result_type;
- result_type operator()( Expr const & expr, lazy_subscript_context & ctx ) const
+ result_type
+ operator()( Expr const & expr, lazy_subscript_context & ctx ) const
{
return proto::child( expr )[ ctx.subscript_ ];
}
@@ -217,7 +238,9 @@
struct lazy_vector_expr
: proto::extends<Expr, lazy_vector_expr<Expr>, lazy_vector_domain>
{
- typedef proto::extends<Expr, lazy_vector_expr<Expr>, lazy_vector_domain> base_type;
+ typedef
+ proto::extends<Expr, lazy_vector_expr<Expr>, lazy_vector_domain>
+ base_type;
lazy_vector_expr( Expr const & expr = Expr() )
: base_type( expr )
@@ -240,7 +263,9 @@
typedef typename proto::terminal< std::vector<T> >::type expr_type;
lazy_vector( std::size_t size = 0, T const & value = T() )
- : lazy_vector_expr<expr_type>( expr_type::make( std::vector<T>( size, value ) ) )
+ : lazy_vector_expr<expr_type>(
+ expr_type::make( std::vector<T>( size, value ) )
+ )
{}
template< typename Expr >
@@ -282,7 +307,7 @@
The line `v1 += v2 - v3` is somewhat ambiguous. Clearly we want it to use the
`lazy_vector<>::operator+=` we defined above, but it could also mean to
-construct an even larger expression template using proto's `operator+=`. At
+construct an even larger expression template using Proto's `operator+=`. At
least one compiler actually believes the call to be ambiguous! We have to tell
the compiler which.
Modified: branches/proto/v4/libs/proto/doc/glossary.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/glossary.qbk (original)
+++ branches/proto/v4/libs/proto/doc/glossary.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -11,55 +11,73 @@
[def _T_ [~T]]
+[template anchor[x] '''<anchor id="boost_proto.users_guide.glossary.'''[x]'''" />''']
+
[variablelist
- [ [callable transform]
- [A transform of the form `R(A0,A1,...)` (i.e., a function
- type) where `proto::is_callable<R>::value` is `true`.
- `R` is treated as a polymorphic function object and the
- arguments are treated as transforms that yield the
+ [ [ [anchor callable_transform] callable transform]
+ [A transform of the form `R(A0,A1,...)` (i.e., a function type) where
+ `proto::is_callable<R>::value` is `true`. `R` is treated as a polymorphic
+ function object and the arguments are treated as transforms that yield the
arguments to the function object.] ]
- [ [domain-specific language]
- [A programming language that targets a particular problem
- space by providing programming idioms, abstractions and
- constructs that match the constructs within that problem
- space.]]
- [ [expression]
- [A heterogeneous tree where each node is either an
- instantiation of `boost::proto::expr<>` or some type
- that is an extension (via `boost::proto::extends<>`
- or `BOOST_PROTO_EXTENDS()`) of such an instantiation.]]
- [ [grammar]
- [A grammar is a type that describes a subset of
- expression types. Expressions in a domain must conform
- to that domain's grammar. The `proto::matches<>`
- metafunction evaluates whether an expression type matches
- a grammar. Grammars are either primitives such as `proto::_`,
- composites such as `proto::plus<>`, control structures
- such as `proto::or_<>`, or some type derived from a grammar.]]
- [ [object transform]
- [A transform of the form `R(A0,A1,...)` (i.e., a function
- type) where `proto::is_callable<R>::value` is `false`.
- `R` is treated as the type of an object to construct and
- the arguments are treated as transforms that yield the
- parameters to the constructor.]]
- [ [polymorphic function object]
- [An instance of a class type with an overloaded function
- call operator and an nested `result_type` typedef or
- `result<>` template for calculating the return type of
- the function call operator.]]
- [ [primitive transform]
- [A type that defines a kind of polymorphic function object
- that takes three arguments: expression, state, and data.
- Primitive transforms can be used to compose callable
- transforms and object transforms.]]
- [ [transform]
- [Transforms are used to manipulate expression trees. They
- come in three flavors: primitive transforms, callable
- transforms, or object transforms. A transform `_T_` can
- be made into a ternary polymorphic function object with
- `proto::when<>`, as in `proto::when<proto::_, _T_>`. Such
- a function object accepts /expression/, /state/, and /data/
- parameters, and computes a result from them.]]
+ [ [ [anchor domain] domain]
+ [In Proto, the term /domain/ refers to a type that associates expressions
+ within that domain with a /generator/ for that domain and optionally a
+ /grammar/ for the domain. Domains are used primarily to imbue expressions
+ within that domain with additional members and to restrict Proto's operator
+ overloads such that expressions not conforming to the domain's grammar are
+ never created. Domains are empty structs that inherit from
+ `proto::domain<>`.]]
+ [ [ [anchor dsel] domain-specific embedded language]
+ [A domain-specific language implemented as a library. The langauge in which
+ the library is written is called the "host" langauge, and the language
+ implemented by the library is called the "embedded" language.]]
+ [ [ [anchor dsl] domain-specific language]
+ [A programming language that targets a particular problem space by providing
+ programming idioms, abstractions and constructs that match the constructs
+ within that problem space.]]
+ [ [ [anchor expression] expression]
+ [A heterogeneous tree where each node is either an instantiation of
+ `boost::proto::expr<>` or some type that is an extension (via
+ `boost::proto::extends<>` or `BOOST_PROTO_EXTENDS()`) of such an
+ instantiation.]]
+ [ [ [anchor expression_template] expression template]
+ [A C++ technique using templates and operator overloading to cause
+ expressions to build trees that represent the expression for lazy evaluation
+ later, rather than evaluating the expression eagerly. Some C++ libraries use
+ expression templates to build domain-specific embedded languages.]]
+ [ [ [anchor generator] generator]
+ [In Proto, a /generator/ is a unary polymorphic function object that you
+ specify when defining a /domain/. After constructing a new expression, Proto
+ passes the expression to your domain's generator for further processing.
+ Often, the generator wraps the expression in an extension wrapper that adds
+ additional members to it.]]
+ [ [ [anchor grammar] grammar]
+ [A grammar is a type that describes a subset of expression types. Expressions
+ in a domain must conform to that domain's grammar. The `proto::matches<>`
+ metafunction evaluates whether an expression type matches a grammar.
+ Grammars are either primitives such as `proto::_`, composites such as
+ `proto::plus<>`, control structures such as `proto::or_<>`, or some type
+ derived from a grammar.]]
+ [ [ [anchor object_transform] object transform]
+ [A transform of the form `R(A0,A1,...)` (i.e., a function type) where
+ `proto::is_callable<R>::value` is `false`. `R` is treated as the type of an
+ object to construct and the arguments are treated as transforms that yield
+ the parameters to the constructor.]]
+ [ [ [anchor polymorphic_function_object] polymorphic function object]
+ [An instance of a class type with an overloaded function call operator and an
+ nested `result_type` typedef or `result<>` template for calculating the
+ return type of the function call operator.]]
+ [ [ [anchor primitive_transform] primitive transform]
+ [A type that defines a kind of polymorphic function object that takes three
+ arguments: expression, state, and data. Primitive transforms can be used to
+ compose callable transforms and object transforms.]]
+ [ [ [anchor transform] transform]
+ [Transforms are used to manipulate expression trees. They come in three
+ flavors: primitive transforms, callable transforms, or object transforms. A
+ transform `_T_` can be made into a ternary polymorphic function object with
+ `proto::when<>`, as in `proto::when<proto::_, _T_>`. Such a function object
+ accepts /expression/, /state/, and /data/ parameters, and computes a result
+ from them.]]
]
[endsect]
Modified: branches/proto/v4/libs/proto/doc/grammars.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/grammars.qbk (original)
+++ branches/proto/v4/libs/proto/doc/grammars.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -12,7 +12,9 @@
Expression trees can have a very rich and complicated structure. Often, you
need to know some things about an expression's structure before you can process
it. This section describes the tools Proto provides for peering inside an
-expression tree and discovering its structure.
+expression tree and discovering its structure. And as you'll see in later
+sections, all the really interesting things you can do with Proto begin right
+here.
[/===============================================]
[section:patterns Finding Patterns In Expressions]
@@ -286,7 +288,7 @@
This says that a `CharString` must be a terminal, /and/ its value type must be
the same as `char const *`. Notice the template argument of _if_:
`boost::is_same< proto::_value, char const * >()`. This is Proto transform that
-compares the value of a terminal to `char const *`.
+compares the value type of a terminal to `char const *`.
The _if_ template has a couple of variants. In additon to `if_<Condition>` you
can also say `if_<Condition, ThenGrammar>` and
@@ -387,7 +389,7 @@
[pre
group ::= '(' expression ')'
-factor ::= double | placeholder1 | placeholder2 | group
+factor ::= double | '_1' | '_2' | group
term ::= factor (('*' factor) | ('/' factor))*
expression ::= term (('+' term) | ('-' term))*
]
Modified: branches/proto/v4/libs/proto/doc/history.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/history.qbk (original)
+++ branches/proto/v4/libs/proto/doc/history.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -9,6 +9,10 @@
[variablelist
[
+ [August 11, 2008]
+ [Proto v4 is merged to Boost trunk with more powerful transform protocol.]
+]
+[
[April 7, 2008]
[Proto is accepted into Boost.]
]
Modified: branches/proto/v4/libs/proto/doc/preface.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/preface.qbk (original)
+++ branches/proto/v4/libs/proto/doc/preface.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -7,7 +7,8 @@
[section Preface]
-[:["There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy.]]
+[:["There are more things in heaven and earth, Horatio, than are dreamt of in your
+ philosophy.]]
[:[*['-- William Shakespeare]]]
[heading Description]
@@ -19,11 +20,11 @@
More specifically, Proto provides:
* An expression tree data structure.
+* A mechanism for giving expressions additional behaviors and members.
* Operator overloads for building the tree from an expression.
* Utilities for defining the grammar to which an expression must conform.
* An extensible mechanism for immediately executing an expression template.
* An extensible set of tree transformations to apply to expression trees.
-* A mechanism for giving expressions additional behaviors and members.
[heading Motivation]
@@ -33,63 +34,51 @@
for linear algebra as well as to define C++ parser generators with a readable
syntax. But developing such a library involves writing an inordinate amount of
unreadable and unmaintainable template mumbo-jumbo. Boost.Proto eases the
-development of domain-specific embedded languages (DSELs). Use Proto to define
-the primitives of your mini-language and let Proto handle the operator
-overloading and the construction of the expression parse tree. Immediately
-evaluate the expression tree by passing it a function object. Or transform the
-expression tree by defining the grammar of your mini-language, decorated
-with an assortment of tree transforms provided by Proto or defined by you.
-Then use the grammar to give your users short and readable syntax errors
-for invalid expressions! No more mumbo-jumbo -- an expression template library
-developed with Proto is declarative and readable.
+development of [link boost_proto.users_guide.glossary.dsel domain-specific embedded
+languages (DSELs)]. Use Proto to define the primitives of your mini-language and
+let Proto handle the operator overloading and the construction of the expression
+parse tree. Immediately evaluate the expression tree by passing it a function
+object. Or transform the expression tree by defining the grammar of your mini-
+language, decoratedwith an assortment of tree transforms provided by Proto or
+defined by you. Then use the grammar to give your users short and readable syntax
+errors for invalid expressions! No more mumbo-jumbo -- an expression template
+library developed with Proto is declarative and readable.
In short, Proto is a DSEL for defining DSELs.
-[heading Influences and Related Work]
-
-Proto was initially developed as part of _xpressive_ to simplify the job of
-transforming an expression template into an executable finite state machine
-capable of matching a regular expression. Since then, Proto has found
-application in the redesigned and improved Spirit-2 and the related Karma
-library. As a result of these efforts, Proto evolved into a generic and
-abstract grammar and tree transformation framework applicable in a wide
-variety of DSEL scenarios.
-
-The grammar and tree transformation framework is modelled on Spirit's
-grammar and semantic action framework. The expression tree data structure
-is similar to Fusion data structures in many respects, and is interoperable
-with Fusion's iterators and algorithms.
-
-The syntax for the grammar-matching features of `proto::matches<>` is inspired
-by MPL's lambda expressions, and by Aleksey Gurtovoy's
-[@http://lists.boost.org/Archives/boost/2002/11/39718.php "round" lambda] notation.
-
-[heading Further Reading]
-
-A technical paper about an earlier version of Proto was accepted into the
-[@http://lcsd.cs.tamu.edu/2007/ ACM SIGPLAN Symposium on Library-Centric Software Design LCSD'07],
-and can be found at [@http://lcsd.cs.tamu.edu/2007/final/1/1_Paper.pdf]. The
-tree transforms described in that paper differ from what exists today.
-
+[/====================================]
[heading How To Use This Documentation]
+[/====================================]
This documentation makes use of the following naming and formatting conventions.
* Code is in `fixed with font` and is syntax-highlighted.
* Replaceable text that you will need to supply is in [~italics].
-* If a name refers to a free function, it is specified like this: `free_function()`;
- that is, it is in code font and its name is followed by `()` to indicate that
- it is a free function.
-* If a name refers to a class template, it is specified like this: `class_template<>`;
- that is, it is in code font and its name is followed by `<>` to indicate that
- it is a class template.
+* If a name refers to a free function, it is specified like this:
+ `free_function()`; that is, it is in code font and its name is followed by `()`
+ to indicate that it is a free function.
+* If a name refers to a class template, it is specified like this:
+ `class_template<>`; that is, it is in code font and its name is followed by `<>`
+ to indicate that it is a class template.
* If a name refers to a function-like macro, it is specified like this: `MACRO()`;
- that is, it is uppercase in code font and its name is followed by `()` to indicate that
- it is a function-like macro. Object-like macros appear without the trailing `()`.
+ that is, it is uppercase in code font and its name is followed by `()` to
+ indicate that it is a function-like macro. Object-like macros appear without the
+ trailing `()`.
* Names that refer to /concepts/ in the generic programming sense are
specified in CamelCase.
[note In addition, notes such as this one specify non-essential information that
provides additional background or rationale.]
+Finally, you can mentally add the following to any code fragments in this document:
+
+ // Include all of Proto
+ #include <boost/proto/proto.hpp>
+
+ // Create a namespace alias for boost::proto
+ namespace proto = boost::proto;
+
+ // Allow unqualified use of Proto's wildcard pattern
+ using proto::_;
+
[endsect]
Modified: branches/proto/v4/libs/proto/doc/proto.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/proto.qbk (original)
+++ branches/proto/v4/libs/proto/doc/proto.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -78,7 +78,9 @@
[include preface.qbk]
+[/===============================]
[section:users_guide Users' Guide]
+[/===============================]
This Users' Guide describes how to use Proto to build expression-template
based Domain-Specific Embedded Langauges. It is broken up in to 5 sections,
@@ -104,11 +106,7 @@
But before we get started, let's have a look at some very simple Proto examples
and say a few words about Proto's philosophy.
-[include installation.qbk]
-
-[include quick_start.qbk]
-
-[include calculator.qbk]
+[include getting_started.qbk]
[include construction.qbk]
@@ -122,13 +120,17 @@
[include examples.qbk]
+[include resources.qbk]
+
[include glossary.qbk]
[endsect]
[xinclude proto.xml]
+[/=================]
[section Appendices]
+[/=================]
[include history.qbk]
Deleted: branches/proto/v4/libs/proto/doc/quick_start.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/quick_start.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
+++ (empty file)
@@ -1,145 +0,0 @@
-[/
- / Copyright (c) 2008 Eric Niebler
- /
- / 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 Hello World]
-
-Below is a very simple program that uses Proto to build an expression template
-and then execute it.
-
- #include <iostream>
- #include <boost/proto/proto.hpp>
- #include <boost/proto/context.hpp>
- #include <boost/typeof/std/ostream.hpp>
- using namespace boost;
-
- proto::terminal< std::ostream & >::type cout_ = { std::cout };
-
- template< typename Expr >
- void evaluate( Expr const & expr )
- {
- proto::default_context ctx;
- proto::eval(expr, ctx);
- }
-
- int main()
- {
- evaluate( cout_ << "hello" << ',' << " world" );
- return 0;
- }
-
-This program outputs the following:
-
-[pre
-hello, world
-]
-
-This program builds an object representing the output operation and passes
-it to an `evaluate()` function, which then executes it.
-
-The basic idea of expression templates is to overload all the operators so
-that, rather than evaluating the expression immediately, they build a tree-like
-representation of the expression so that it can be evaluated later. For each
-operator in an expression, at least one operand must be Proto-ified in order
-for Proto's operator overloads to be found. In the expression ...
-
- cout_ << "hello" << ',' << " world"
-
-... the Proto-ified sub-expression is `cout_`, which is the Proto-ification of
-`std::cout`. The presence of `cout_` "infects" the expression, and brings
-Proto's tree-building operator overloads into consideration. Any literals in
-the expression are then Proto-ified by wrapping them in a Proto terminal before
-they are combined into larger Proto expressions.
-
-Once Proto's operator overloads have built the expression tree, the expression
-can be lazily evaluated later by walking the tree. That is what `proto::eval()`
-does. It is a general tree-walking expression evaluator, whose behavior is
-customizable via a /context/ parameter. The use of _default_context_ assigns
-the standard meanings to the operators in the expression. (By using a different
-context, you could give the operators in your expressions different semantics.
-By default, Proto makes no assumptions about what operators actually /mean/.)
-
-[/=============================]
-[heading Proto Design Philosophy]
-[/=============================]
-
-Before we continue, let's use the above example to illustrate an important
-design principle of Proto's. The expression template created in the ['hello
-world] example is totally general and abstract. It is not tied in any way to
-any particular domain or application, nor does it have any particular meaning
-or behavior on its own, until it is evaluated in a /context/. Expression
-templates are really just heterogeneous trees, which might mean something in
-one domain, and something else entirely in a different one.
-
-As we'll see later, there is a way to create Proto expression trees that are
-['not] purely abstract, and that have meaning and behaviors independent of any
-context. There is also a way to control which operators are overloaded for your
-particular domain. But that is not the default behavior. We'll see later why
-the default is often a good thing.
-
-[/=========================]
-[section Naming Conventions]
-[/=========================]
-
-Proto is a large library and probably quite unlike any library you've used
-before. Proto uses some consistent naming conventions to make it easier to
-navigate, and they're described below.
-
-[/===============]
-[heading Functions]
-[/===============]
-
-All of Proto's functions are defined in the `boost::proto` namespace. For
-example, there is a function called `value()` defined in `boost::proto` that
-accepts a terminal expression and returns the terminal's value.
-
-[/===================]
-[heading Metafunctions]
-[/===================]
-
-Proto defines /metafunctions/ that correspond to each of Proto's free functions.
-The metafunctions are used to compute the functions' return types. All of
-Proto's metafunctions live in the `boost::proto::result_of` namespace and
-have the same name as the functions to which they correspond. For instance,
-there is a class template `boost::proto::result_of::value<>` that you can
-use to compute the return type of the `boost::proto::value()` function.
-
-[/======================]
-[heading Function Objects]
-[/======================]
-
-Proto defines /function object/ equivalents of all of its free functions. (A
-function object is an instance of a class type that defines an `operator()`
-member function.) All of Proto's function object types are defined in the
-`boost::proto::functional` namespace and have the same name as their
-corresponding free functions. For example, `boost::proto::functional::value`
-is a class that defines a function object that does the same thing as the
-`boost::proto::value()` free function.
-
-[/==========================]
-[heading Primitive Transforms]
-[/==========================]
-
-Proto also defines /primitive transforms/ -- class types that can be used
-to compose larger transforms for manipulating expression trees. Many of
-Proto's free functions have corresponding primitive transforms. These live
-in the `boost::proto` namespace and their names have a leading underscore.
-For instance, the transform corresponding to the `value()` function is
-called `boost::proto::_value`.
-
-The following table summarizes the discussion above:
-
-[table Proto Naming Conventions
- [[Entity] [Example] ]
- [[Free Function] [`boost::proto::value()`] ]
- [[Metafunction] [`boost::proto::result_of::value<>`] ]
- [[Function Object] [`boost::proto::functional::value`] ]
- [[Transform] [`boost::proto::_value`] ]
-]
-
-[endsect]
-
-[endsect]
Modified: branches/proto/v4/libs/proto/doc/transforms.qbk
==============================================================================
--- branches/proto/v4/libs/proto/doc/transforms.qbk (original)
+++ branches/proto/v4/libs/proto/doc/transforms.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -7,16 +7,16 @@
[import ../test/examples.cpp]
-[/==========================================================]
-[section:expression_transformation Expression Transformation]
-[/==========================================================]
-
-Sometimes, rather than immediately executing an expression template, you'd
-like to transform it into some other object. Maybe the transformation is simple,
-like converting all references into values. Maybe it's complicated, like
-transforming an expression template into a finite-state automata for matching a
-regular expression. Proto provides a framework for applying tree
-transformations and several canned transformations that are generally useful.
+[/============================================================================]
+[section:expression_transformation Expression Transformation: Semantic Actions]
+[/============================================================================]
+
+Sometimes, rather than immediately executing an expression template, you'd like to
+transform it into some other object. Maybe the transformation is simple, like
+converting all references into values. Maybe it's complicated, like transforming an
+expression template into a finite-state automata for matching a regular expression.
+Proto provides a framework for applying tree transformations and several canned
+transformations that are generally useful.
[/===============]
[heading Overview]
@@ -34,10 +34,10 @@
proto::when< proto::terminal<int>, proto::terminal<long>::type(proto::_value) >
-`proto::terminal<long>::type(proto::_value)` is an example of a Proto transform. It says to
-create an object of type `proto::terminal<long>::type` and initialize it with the
-result of the `proto::_value` transform. `proto::_value` is a transform defined by Proto which
-extracts the value from a terminal expression.
+`proto::terminal<long>::type(proto::_value)` is an example of a Proto transform. It
+says to create an object of type `proto::terminal<long>::type` and initialize it
+with the result of the `proto::_value` transform. `proto::_value` is a transform
+defined by Proto which extracts the value from a terminal expression.
[note The transform above might look a little strange at first. It appears
to be constructing a temporary object in place. In fact, it is a
@@ -163,6 +163,12 @@
will be to write a transform that calculates the arity of any calculator
expression.
+[note *Why Bother Calculating Expression Arity?*
+
+This is more than just an intelectual exercise. Knowing the arity of a calculator
+expression is important if you want to give users a meaningful error message when
+they specify too few or too many arguments to an expression.]
+
[/=========================]
[heading Defining a Grammar]
[/=========================]
@@ -180,13 +186,12 @@
[CalcGrammar]
-We can read this as follows: a calculator expression is either placeholder 1,
-placeholder 2, some other terminal, or some unary or binary operator whose
-operands are calculator expressions. Recall that `proto::_` is a wildcard which
-matches anything. So `proto::terminal< _ >` will match any terminal, and
-`proto::unary_expr< _, CalcArity >` will match any unary expression
-for which the operand matches `CalcArity` (the `_` matches any operator
-tag).
+We can read this as follows: a calculator expression is either placeholder 1,
+placeholder 2, some other terminal, or some unary or binary operator whose operands
+are calculator expressions. Recall that `proto::_` is a wildcard that matches
+anything. So `proto::terminal< _ >` will match any terminal, and
+`proto::unary_expr< _, CalcArity >` will match any unary expression for which the
+operand matches `CalcArity` (the `_` matches any operator tag).
[/============================]
[heading Writing the Transform]
@@ -209,18 +214,18 @@
the arity of all of the sub-expressions and taking the maximum.
Let's look at the sub-expression for the placeholder `_1`. It is matched by this
-part of our grammar: `proto::terminal< placeholder1 >`. We want to associate this
+part of our grammar: `proto::terminal< placeholder<0> >`. We want to associate this
part of our grammar with an arity of `1`. We do that by attaching a transform.
Since the arity of an expression can be evaluated at compile time, let's use
`mpl::int_<1>` to represent the arity of the first placeholder. The following
attaches a transform that always evaluates to `mpl::int_<1>`:
- proto::when< proto::terminal< placeholder1 >, mpl::int_<1>() >
+ proto::when< proto::terminal< placeholder<0> >, mpl::int_<1>() >
-This grammar rule will match any `placeholder1` terminal, and will transform it
+This grammar rule will match any `placeholder<0>` terminal, and will transform it
to a (default-constructed) `mpl::int_<1>` object. As described previously,
`mpl::int_<1>()` is a function type, but Proto interprets it as an object to
-construct. We will have a similar transform to convert `placeholder2` terminals
+construct. We will have a similar transform to convert `placeholder<1>` terminals
into `mpl::int_<2>`, and other terminals into `mpl::int_<0>`.
Next, let's write a transform for unary operators that returns the arity of the
@@ -234,15 +239,20 @@
differently. Rather than trying to construct a `CalcArity` object, Proto
knows this is a function object and invokes it instead.
-[note When using function types as Proto transforms, they can either represent
-an object to construct or a function to call. It is similar to C++ where the
-syntax `foo(x)` can either be interpreted as an object to construct or a
-function to call, depending on whether `foo` is a type or a function. Proto
-can't know in general which is the case, so it uses a trait, `proto::is_callable<>`,
-to differentiate. `is_callable< mpl::int_<1> >::value` is false so `mpl::int_<1>()`
-is an object to construct, but `is_callable< CalcArity >::value` is true so
-`CalcArity(proto::_child)` is a function to call. (`is_callable< CalcArity >::value`
-is true because `CalcArity` inherits from `proto::or_<>`, which is callable.)]
+[/================================================]
+[note *Object Transforms vs. Callable Transforms*
+
+When using function types as Proto transforms, they can either represent an object
+to construct or a function to call. It is similar to C++ where the syntax `foo(x)`
+can either be interpreted as an object to construct or a function to call,
+depending on whether `foo` is a type or a function. Proto can't know in general
+which is the case, so it uses a trait, `proto::is_callable<>`, to differentiate.
+`is_callable< mpl::int_<1> >::value` is false so `mpl::int_<1>()` is an object to
+construct, but `is_callable< CalcArity >::value` is true so
+`CalcArity(proto::_child)` is a function to call.
+(`is_callable< CalcArity >::value` is true because `CalcArity` inherits from
+`proto::or_<>`, which is callable.)]
+[/================================================]
[/
That begs the question, what does `unary_expr<>`'s transform do? Well,
@@ -273,7 +283,7 @@
which would have the following type:
expr< tag::unary_plus, list1<
- expr< tag::terminal, term< placeholder1 > >
+ expr< tag::terminal, term< placeholder<0> > >
> >
If we executed the `unary_expr< _, CalcArity >` transform on this
@@ -352,11 +362,10 @@
We can use our `CalcArity` transform to calculate the arity of any
calculator expression:
- int i = 0; // not used, dummy state and data parameter
-
- std::cout << CalcArity()( lit(100) * 200, i, i) << '\n';
- std::cout << CalcArity()( (_1 - _1) / _1 * 100, i, i) << '\n';
- std::cout << CalcArity()( (_2 - _1) / _2 * 100, i, i) << '\n';
+ CalcArity arity_of;
+ std::cout << arity_of( proto::lit(100) * 20 ) << '\n';
+ std::cout << arity_of( (_1 - _1) / _1 * 100 ) << '\n';
+ std::cout << arity_of( (_2 - _1) / _2 * 100 ) << '\n';
This displays the following:
Modified: branches/proto/v4/libs/tr1/test/run_random.cpp
==============================================================================
--- branches/proto/v4/libs/tr1/test/run_random.cpp (original)
+++ branches/proto/v4/libs/tr1/test/run_random.cpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -92,7 +92,7 @@
a1 = a2;
validate("mt11213b", a2, 3809585648u);
validate("mt11213b", a1, 3809585648u);
- a1.seed(0u);
+ a1.seed(5489UL);
validate("mt11213b", a1, 3809585648u);
a1 = mt11213b(5489u);
validate("mt11213b", a1, 3809585648u);
Modified: branches/proto/v4/libs/unordered/doc/changes.qbk
==============================================================================
--- branches/proto/v4/libs/unordered/doc/changes.qbk (original)
+++ branches/proto/v4/libs/unordered/doc/changes.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -33,4 +33,9 @@
are available.
* Added equality operators.
+[h2 Development...]
+
+* Rename overload of `emplace` with hint, to `emplace_hint` as specified in
+ [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2691.pdf n2691].
+
[endsect]
Modified: branches/proto/v4/libs/unordered/doc/intro.qbk
==============================================================================
--- branches/proto/v4/libs/unordered/doc/intro.qbk (original)
+++ branches/proto/v4/libs/unordered/doc/intro.qbk 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -9,7 +9,7 @@
[@http://www.boost.org/doc/html/boost_tr1.html
Boost.TR1]]
[def __draft__
- [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2007/n2461.pdf
+ [@http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2691.pdf
Working Draft of the C++ Standard]]
[def __hash-table__ [@http://en.wikipedia.org/wiki/Hash_table
hash table]]
Modified: branches/proto/v4/libs/unordered/doc/ref.xml
==============================================================================
--- branches/proto/v4/libs/unordered/doc/ref.xml (original)
+++ branches/proto/v4/libs/unordered/doc/ref.xml 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -24,7 +24,7 @@
</purpose>
<description>
<para>For the normative reference see chapter 23 of
- <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf">the working draft of the C++ standard [n2461].</ulink></para>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -287,7 +287,7 @@
<para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
</notes>
</method>
- <method name="emplace">
+ <method name="emplace_hint">
<template>
<template-type-parameter name="Args" pack="1">
</template-type-parameter>
@@ -754,7 +754,7 @@
</purpose>
<description>
<para>For the normative reference see chapter 23 of
- <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf">the working draft of the C++ standard [n2461].</ulink></para>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -1016,7 +1016,7 @@
<para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
</notes>
</method>
- <method name="emplace">
+ <method name="emplace_hint">
<template>
<template-type-parameter name="Args" pack="1">
</template-type-parameter>
@@ -1488,7 +1488,7 @@
</purpose>
<description>
<para>For the normative reference see chapter 23 of
- <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf">the working draft of the C++ standard [n2461].</ulink></para>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -1757,7 +1757,7 @@
<para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
</notes>
</method>
- <method name="emplace">
+ <method name="emplace_hint">
<template>
<template-type-parameter name="Args" pack="1">
</template-type-parameter>
@@ -2267,7 +2267,7 @@
</purpose>
<description>
<para>For the normative reference see chapter 23 of
- <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf">the working draft of the C++ standard [n2461].</ulink></para>
+ <ulink url="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2691.pdf">the working draft of the C++ standard [n2691].</ulink></para>
<para><emphasis role="bold">Template Parameters</emphasis>
<informaltable>
<tgroup cols="2">
@@ -2535,7 +2535,7 @@
<para>Only available on compilers with support for variadic template arguments and rvalue references.</para>
</notes>
</method>
- <method name="emplace">
+ <method name="emplace_hint">
<template>
<template-type-parameter name="Args" pack="1">
</template-type-parameter>
Modified: branches/proto/v4/libs/unordered/test/unordered/compile_tests.hpp
==============================================================================
--- branches/proto/v4/libs/unordered/test/unordered/compile_tests.hpp (original)
+++ branches/proto/v4/libs/unordered/test/unordered/compile_tests.hpp 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -290,7 +290,7 @@
const_iterator q = a.cbegin();
test::check_return_type<iterator>::equals(a.insert(q, t));
#if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)
- test::check_return_type<iterator>::equals(a.emplace(q, t));
+ test::check_return_type<iterator>::equals(a.emplace_hint(q, t));
#endif
a.insert(i, j);
Modified: branches/proto/v4/libs/xpressive/test/regress.txt
==============================================================================
--- branches/proto/v4/libs/xpressive/test/regress.txt (original)
+++ branches/proto/v4/libs/xpressive/test/regress.txt 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -3738,3 +3738,13 @@
flg=m
br0=c
[end]
+
+[nocasealternate]
+str=common HighLight and Blow this
+pat=highlight|blow
+flg=ig
+sub=<b>$&</b>
+res=common <b>HighLight</b> and <b>Blow</b> this
+br0=HighLight
+br1=Blow
+[end]
Modified: branches/proto/v4/more/getting_started/detail/build-from-source-head.rst
==============================================================================
--- branches/proto/v4/more/getting_started/detail/build-from-source-head.rst (original)
+++ branches/proto/v4/more/getting_started/detail/build-from-source-head.rst 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -123,4 +123,4 @@
.. parsed-literal::
- bjam **--build-dir=**\ |build-directory|_ **--toolset=**\ |toolset-name|_ stage
+ bjam **--build-dir=**\ |build-directory|_ **--toolset=**\ |toolset-name|_ *[*\ **--build-type=complete**\ *]* stage
Modified: branches/proto/v4/more/getting_started/index.html
==============================================================================
--- branches/proto/v4/more/getting_started/index.html (original)
+++ branches/proto/v4/more/getting_started/index.html 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -14,6 +14,13 @@
<!-- Copyright David Abrahams 2006. 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) -->
+<div class="admonition-use-the-latest-version-of-this-getting-started-guide admonition">
+<p class="first admonition-title">Use the latest version of this Getting Started guide</p>
+<p class="last">The <a class="reference external" href="http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html">Boost website version of this Getting Started guide</a> may
+have undated information, such as the location of additional installers
+or improved installation procedures, so you might want use that version
+if you've got an Internet connection available.</p>
+</div>
<div class="section" id="welcome">
<h1>Welcome</h1>
<p>Welcome to the Boost libraries! By the time you've completed this
Modified: branches/proto/v4/more/getting_started/index.rst
==============================================================================
--- branches/proto/v4/more/getting_started/index.rst (original)
+++ branches/proto/v4/more/getting_started/index.rst 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -12,6 +12,16 @@
__ ../../index.htm
+.. Admonition:: Use the latest version of this Getting Started guide
+
+ The `Boost website version of this Getting Started guide`_ may
+ have undated information, such as the location of additional installers
+ or improved installation procedures, so you might want use that version
+ if you've got an Internet connection available.
+
+ .. _`Boost website version of this Getting Started guide`:
+ http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html
+
Welcome
-------
Modified: branches/proto/v4/more/getting_started/unix-variants.html
==============================================================================
--- branches/proto/v4/more/getting_started/unix-variants.html (original)
+++ branches/proto/v4/more/getting_started/unix-variants.html 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -63,12 +63,12 @@
<p>The most reliable way to get a copy of Boost is to download a
distribution from <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041">SourceForge</a>:</p>
<ol class="arabic">
-<li><p class="first">Download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">.tar.bz2</span></tt></a>.</p>
+<li><p class="first">Download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.tar.bz2</span></tt></a>.</p>
</li>
<li><p class="first">In the directory where you want to put the Boost installation,
execute</p>
<pre class="literal-block">
-tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>.tar.bz2
+tar --bzip2 -xf <em>/path/to/</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>.tar.bz2
</pre>
</li>
</ol>
@@ -91,7 +91,7 @@
<h1><a class="toc-backref" href="#id19">2 The Boost Distribution</a></h1>
<p>This is a sketch of the resulting directory structure:</p>
<pre class="literal-block">
-<strong>boost_1_35_0</strong><strong>/</strong> .................<em>The âboost root directoryâ</em>
+<strong>boost_1_36_0</strong><strong>/</strong> .................<em>The âboost root directoryâ</em>
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
<strong>boost</strong><strong>/</strong> .........................<em>All Boost Header files</em>
<tt class="docutils literal"> </tt>
@@ -136,7 +136,7 @@
</div>
<p>It's important to note the following:</p>
<ol class="arabic" id="boost-root-directory">
-<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">/usr/local/</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>) is
+<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">/usr/local/</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>) is
sometimes referred to as <tt class="docutils literal"><span class="pre">$BOOST_ROOT</span></tt> in documentation and
mailing lists .</p>
</li>
@@ -230,7 +230,7 @@
<p>Now, in the directory where you saved <tt class="docutils literal"><span class="pre">example.cpp</span></tt>, issue the
following command:</p>
<pre class="literal-block">
-c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt> example.cpp -o example
+c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt> example.cpp -o example
</pre>
<p>To test the result, type:</p>
<pre class="literal-block">
@@ -261,7 +261,7 @@
<p>Issue the following commands in the shell (don't type <tt class="docutils literal"><span class="pre">$</span></tt>; that
represents the shell's prompt):</p>
<pre class="literal-block">
-<strong>$</strong> cd <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>
+<strong>$</strong> cd <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
<strong>$</strong> ./configure --help
</pre>
<p>Select your configuration options and invoke <tt class="docutils literal"><span class="pre">./configure</span></tt> again
@@ -421,13 +421,18 @@
<p>Change your current directory to the Boost root directory and
invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> as follows:</p>
<pre class="literal-block">
-bjam <strong>--build-dir=</strong><a class="reference internal" href="#id10"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> stage
+bjam <strong>--build-dir=</strong><a class="reference internal" href="#id10"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <em>[</em><strong>--build-type=complete</strong><em>]</em> stage
</pre>
<p>For example, your session might look like this:</p>
<pre class="literal-block">
-$ cd ~/<tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>
+$ cd ~/<tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
$ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>--toolset=</strong>gcc stage
</pre>
+<p>That will build static and shared non-debug multi-threaded variations of the libraries. To build all variations:</p>
+<pre class="literal-block">
+$ cd ~/<tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
+$ bjam <strong>--build-dir=</strong>/tmp/build-boost <strong>--toolset=</strong>gcc <strong>--build-type=complete</strong> stage
+</pre>
<!-- Copyright David Abrahams 2006. 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) -->
@@ -533,15 +538,15 @@
<ol class="upperalpha">
<li><p class="first">You can specify the full path to each library:</p>
<pre class="literal-block">
-$ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt> example.cpp -o example <strong>\</strong>
- <strong>~/boost/lib/libboost_regex-gcc34-mt-d-1_35.a</strong>
+$ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt> example.cpp -o example <strong>\</strong>
+ <strong>~/boost/lib/libboost_regex-gcc34-mt-d-1_36.a</strong>
</pre>
</li>
<li><p class="first">You can separately specify a directory to search (with <tt class="docutils literal"><span class="pre">-L</span></tt><em>directory</em>) and a library name to search for (with <tt class="docutils literal"><span class="pre">-l</span></tt><em>library</em>,<a class="footnote-reference" href="#lowercase-l" id="id12"><sup>2</sup></a> dropping the filename's leading <tt class="docutils literal"><span class="pre">lib</span></tt> and trailing
suffix (<tt class="docutils literal"><span class="pre">.a</span></tt> in this case):</p>
<pre class="literal-block">
-$ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt> example.cpp -o example <strong>\</strong>
- <strong>-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_35</strong>
+$ c++ -I <em>path/to/</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt> example.cpp -o example <strong>\</strong>
+ <strong>-L~/boost/lib/ -lboost_regex-gcc34-mt-d-1_36</strong>
</pre>
<p>As you can see, this method is just as terse as method A for one
library; it <em>really</em> pays off when you're using multiple
Modified: branches/proto/v4/more/getting_started/unix-variants.rst
==============================================================================
--- branches/proto/v4/more/getting_started/unix-variants.rst (original)
+++ branches/proto/v4/more/getting_started/unix-variants.rst 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -142,6 +142,13 @@
$ cd ~/|boost_ver|
$ bjam **--build-dir=**\ /tmp/build-boost **--toolset=**\ gcc stage
+That will build static and shared non-debug multi-threaded variations of the libraries. To build all variations:
+
+.. parsed-literal::
+
+ $ cd ~/|boost_ver|
+ $ bjam **--build-dir=**\ /tmp/build-boost **--toolset=**\ gcc **--build-type=complete** stage
+
.. include:: detail/build-from-source-tail.rst
.. include:: detail/link-head.rst
Modified: branches/proto/v4/more/getting_started/windows.html
==============================================================================
--- branches/proto/v4/more/getting_started/windows.html (original)
+++ branches/proto/v4/more/getting_started/windows.html 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -26,60 +26,61 @@
<div class="contents topic" id="index">
<p class="topic-title first">Index</p>
<ul class="auto-toc simple">
-<li><a class="reference internal" href="#get-boost" id="id24">1 Get Boost</a></li>
-<li><a class="reference internal" href="#the-boost-distribution" id="id25">2 The Boost Distribution</a></li>
-<li><a class="reference internal" href="#header-only-libraries" id="id26">3 Header-Only Libraries</a></li>
-<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id27">4 Build a Simple Program Using Boost</a><ul class="auto-toc">
-<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id28">4.1 Build From the Visual Studio IDE</a></li>
-<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id29">4.2 Or, Build From the Command Prompt</a></li>
-<li><a class="reference internal" href="#errors-and-warnings" id="id30">4.3 Errors and Warnings</a></li>
+<li><a class="reference internal" href="#get-boost" id="id26">1 Get Boost</a></li>
+<li><a class="reference internal" href="#the-boost-distribution" id="id27">2 The Boost Distribution</a></li>
+<li><a class="reference internal" href="#header-only-libraries" id="id28">3 Header-Only Libraries</a></li>
+<li><a class="reference internal" href="#build-a-simple-program-using-boost" id="id29">4 Build a Simple Program Using Boost</a><ul class="auto-toc">
+<li><a class="reference internal" href="#build-from-the-visual-studio-ide" id="id30">4.1 Build From the Visual Studio IDE</a></li>
+<li><a class="reference internal" href="#or-build-from-the-command-prompt" id="id31">4.2 Or, Build From the Command Prompt</a></li>
+<li><a class="reference internal" href="#errors-and-warnings" id="id32">4.3 Errors and Warnings</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id31">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
-<li><a class="reference internal" href="#install-visual-studio-2005-or-net-2003-binaries" id="id32">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></li>
-<li><a class="reference internal" href="#or-build-binaries-from-source" id="id33">5.2 Or, Build Binaries From Source</a><ul class="auto-toc">
-<li><a class="reference internal" href="#get-bjam" id="id34">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
-<li><a class="reference internal" href="#identify-your-toolset" id="id35">5.2.2 Identify Your Toolset</a></li>
-<li><a class="reference internal" href="#select-a-build-directory" id="id36">5.2.3 Select a Build Directory</a></li>
-<li><a class="reference internal" href="#invoke-bjam" id="id37">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
+<li><a class="reference internal" href="#prepare-to-use-a-boost-library-binary" id="id33">5 Prepare to Use a Boost Library Binary</a><ul class="auto-toc">
+<li><a class="reference internal" href="#install-visual-studio-binaries" id="id34">5.1 Install Visual Studio Binaries</a></li>
+<li><a class="reference internal" href="#or-build-binaries-from-source" id="id35">5.2 Or, Build Binaries From Source</a><ul class="auto-toc">
+<li><a class="reference internal" href="#get-bjam" id="id36">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
+<li><a class="reference internal" href="#identify-your-toolset" id="id37">5.2.2 Identify Your Toolset</a></li>
+<li><a class="reference internal" href="#select-a-build-directory" id="id38">5.2.3 Select a Build Directory</a></li>
+<li><a class="reference internal" href="#invoke-bjam" id="id39">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></li>
</ul>
</li>
-<li><a class="reference internal" href="#expected-build-output" id="id38">5.3 Expected Build Output</a></li>
-<li><a class="reference internal" href="#in-case-of-build-errors" id="id39">5.4 In Case of Build Errors</a></li>
+<li><a class="reference internal" href="#expected-build-output" id="id40">5.3 Expected Build Output</a></li>
+<li><a class="reference internal" href="#in-case-of-build-errors" id="id41">5.4 In Case of Build Errors</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id40">6 Link Your Program to a Boost Library</a><ul class="auto-toc">
-<li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id41">6.1 Link From Within the Visual Studio IDE</a></li>
-<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id42">6.2 Or, Link From the Command Prompt</a></li>
-<li><a class="reference internal" href="#library-naming" id="id43">6.3 Library Naming</a></li>
-<li><a class="reference internal" href="#test-your-program" id="id44">6.4 Test Your Program</a></li>
+<li><a class="reference internal" href="#link-your-program-to-a-boost-library" id="id42">6 Link Your Program to a Boost Library</a><ul class="auto-toc">
+<li><a class="reference internal" href="#link-from-within-the-visual-studio-ide" id="id43">6.1 Link From Within the Visual Studio IDE</a></li>
+<li><a class="reference internal" href="#or-link-from-the-command-prompt" id="id44">6.2 Or, Link From the Command Prompt</a></li>
+<li><a class="reference internal" href="#library-naming" id="id45">6.3 Library Naming</a></li>
+<li><a class="reference internal" href="#test-your-program" id="id46">6.4 Test Your Program</a></li>
</ul>
</li>
-<li><a class="reference internal" href="#conclusion-and-further-resources" id="id45">7 Conclusion and Further Resources</a></li>
+<li><a class="reference internal" href="#conclusion-and-further-resources" id="id47">7 Conclusion and Further Resources</a></li>
</ul>
</div>
<div class="section" id="get-boost">
-<h1><a class="toc-backref" href="#id24">1 Get Boost</a></h1>
-<p>The easiest way to get a copy of Boost is to use the <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a>
-provided by <a class="reference external" href="http://www.boost-consulting.com">Boost Consulting</a>. We especially recommend this
-method if you use Microsoft Visual Studio .NET 2003 or Microsoft
-Visual Studio 2005, because the installer can download and install
+<h1><a class="toc-backref" href="#id26">1 Get Boost</a></h1>
+<p>The easiest way to get a copy of Boost is to use an installer.
+The <a class="reference external" href="http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html">Boost website version of this Getting Started guide</a> will
+have undated information on installers as they become available,
+or see <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041">Boost downloads</a> or the <a class="reference external" href="http://www.boostpro.com/products/free">installer</a> provided by <a class="reference external" href="http://www.boostpro.com">BoostPro Computing</a>. We especially recommend using
+an installer if you use Microsoft Visual Studio, because the installer can download and install
precompiled library binaries, saving you the trouble of building
them yourself. To complete this tutorial, you'll need to at least
install the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binaries when given the option.</p>
<p>If you're using an earlier version of Visual Studio or some other
compiler, or if you prefer to build everything yourself, you can
-download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">.exe</span></tt></a> and run it to install a complete Boost
+download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></tt></a> or <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.zip</span></tt></a> and unpack it to install a complete Boost
distribution.<a class="footnote-reference" href="#zip" id="id2"><sup>1</sup></a></p>
<!-- Copyright David Abrahams 2006. 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) -->
</div>
<div class="section" id="the-boost-distribution">
-<h1><a class="toc-backref" href="#id25">2 The Boost Distribution</a></h1>
+<h1><a class="toc-backref" href="#id27">2 The Boost Distribution</a></h1>
<p>This is a sketch of the resulting directory structure:</p>
<pre class="literal-block">
-<strong>boost_1_35_0</strong><strong>\</strong> .................<em>The âboost root directoryâ</em>
+<strong>boost_1_36_0</strong><strong>\</strong> .................<em>The âboost root directoryâ</em>
<strong>index.htm</strong> .........<em>A copy of www.boost.org starts here</em>
<strong>boost</strong><strong>\</strong> .........................<em>All Boost Header files</em>
<strong>lib</strong><strong>\</strong> .....................<em>precompiled library binaries</em>
@@ -124,7 +125,7 @@
</div>
<p>It's important to note the following:</p>
<ol class="arabic" id="boost-root-directory">
-<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>) is
+<li><p class="first">The path to the <strong>boost root directory</strong> (often <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>) is
sometimes referred to as <tt class="docutils literal"><span class="pre">$BOOST_ROOT</span></tt> in documentation and
mailing lists .</p>
</li>
@@ -159,7 +160,7 @@
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="header-only-libraries">
-<h1><a class="toc-backref" href="#id26">3 Header-Only Libraries</a></h1>
+<h1><a class="toc-backref" href="#id28">3 Header-Only Libraries</a></h1>
<p>The first thing many people want to know is, âhow do I build
Boost?â The good news is that often, there's nothing to build.</p>
<div class="admonition-nothing-to-build admonition">
@@ -199,7 +200,7 @@
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="build-a-simple-program-using-boost">
-<h1><a class="toc-backref" href="#id27">4 Build a Simple Program Using Boost</a></h1>
+<h1><a class="toc-backref" href="#id29">4 Build a Simple Program Using Boost</a></h1>
<p>To keep things simple, let's start by using a header-only library.
The following program reads a sequence of integers from standard
input, uses Boost.Lambda to multiply each number by three, and
@@ -248,14 +249,14 @@
</pre>
<p>followed by Return. For example,</p>
<pre class="literal-block">
-cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>
+cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
</pre>
<p class="last">Long commands can be continued across several lines by typing a
caret (<tt class="docutils literal"><span class="pre">^</span></tt>) at the end of all but the last line. Some examples
on this page use that technique to save horizontal space.</p>
</div>
<div class="section" id="build-from-the-visual-studio-ide">
-<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id28">4.1 Build From the Visual Studio IDE</a></h2>
+<span id="vs-header-only"></span><h2><a class="toc-backref" href="#id30">4.1 Build From the Visual Studio IDE</a></h2>
<ul>
<li><p class="first">From Visual Studio's <em>File</em> menu, select <em>New</em> > <em>Projectâ¦</em></p>
</li>
@@ -273,7 +274,7 @@
<li><p class="first">In <em>Configuration Properties</em> > <em>C/C++</em> > <em>General</em> > <em>Additional Include
Directories</em>, enter the path to the Boost root directory, for example</p>
<blockquote>
-<p><tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt></p>
+<p><tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt></p>
</blockquote>
</li>
<li><p class="first">In <em>Configuration Properties</em> > <em>C/C++</em> > <em>Precompiled Headers</em>, change
@@ -296,7 +297,7 @@
<p><a class="reference internal" href="#errors-and-warnings"><em>skip to the next step</em></a></p>
</div>
<div class="section" id="or-build-from-the-command-prompt">
-<h2><a class="toc-backref" href="#id29">4.2 Or, Build From the Command Prompt</a></h2>
+<h2><a class="toc-backref" href="#id31">4.2 Or, Build From the Command Prompt</a></h2>
<p>From your computer's <em>Start</em> menu, if you are a Visual
Studio 2005 user, select</p>
<blockquote>
@@ -311,7 +312,7 @@
directory</a> to a suitable location for creating some temporary
files and type the following command followed by the Return key:</p>
<pre class="literal-block">
-cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt> <em>path</em>\<em>to</em>\example.cpp
+cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt> <em>path</em>\<em>to</em>\example.cpp
</pre>
<p>To test the result, type:</p>
<pre class="literal-block">
@@ -322,7 +323,7 @@
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="errors-and-warnings">
-<h2><a class="toc-backref" href="#id30">4.3 Errors and Warnings</a></h2>
+<h2><a class="toc-backref" href="#id32">4.3 Errors and Warnings</a></h2>
<p>Don't be alarmed if you see compiler warnings originating in Boost
headers. We try to eliminate them, but doing so isn't always
practical.<a class="footnote-reference" href="#warnings" id="id7"><sup>5</sup></a> <strong>Errors are another matter</strong>. If you're
@@ -335,21 +336,21 @@
</div>
</div>
<div class="section" id="prepare-to-use-a-boost-library-binary">
-<h1><a class="toc-backref" href="#id31">5 Prepare to Use a Boost Library Binary</a></h1>
+<h1><a class="toc-backref" href="#id33">5 Prepare to Use a Boost Library Binary</a></h1>
<p>If you want to use any of the separately-compiled Boost libraries,
you'll need to acquire library binaries.</p>
-<div class="section" id="install-visual-studio-2005-or-net-2003-binaries">
-<h2><a class="toc-backref" href="#id32">5.1 Install Visual Studio (2005 or .NET 2003) Binaries</a></h2>
-<p>The <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> supplied by Boost Consulting will download and
+<div class="section" id="install-visual-studio-binaries">
+<h2><a class="toc-backref" href="#id34">5.1 Install Visual Studio Binaries</a></h2>
+<p>The installers will download and
install pre-compiled binaries into the <tt class="docutils literal"><span class="pre">lib\</span></tt> subdirectory of the
-boost root, typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed
+boost root, typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>. If you installed
all variants of the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> binary, you're done with this
step. Otherwise, please run the installer again and install them
now.</p>
<p><a class="reference internal" href="#link-your-program-to-a-boost-library"><em>skip to the next step</em></a></p>
</div>
<div class="section" id="or-build-binaries-from-source">
-<h2><a class="toc-backref" href="#id33">5.2 Or, Build Binaries From Source</a></h2>
+<h2><a class="toc-backref" href="#id35">5.2 Or, Build Binaries From Source</a></h2>
<p>If you're using an earlier version of Visual C++, or a compiler
from another vendor, you'll need to use <a class="reference external" href="../../tools/build/index.html">Boost.Build</a> to create your
own binaries.</p>
@@ -361,7 +362,7 @@
<tt class="docutils literal"><span class="pre">bjam</span></tt>.</p>
<!-- .. _Boost.Jam documentation: Boost.Jam_ -->
<div class="section" id="get-bjam">
-<h3><a class="toc-backref" href="#id34">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
+<h3><a class="toc-backref" href="#id36">5.2.1 Get <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
<p><tt class="docutils literal"><span class="pre">bjam</span></tt> is the <a class="reference internal" href="#command-line-tool">command-line tool</a> that drives the Boost Build
system. To build Boost binaries, you'll invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> from the
Boost root.</p>
@@ -370,7 +371,7 @@
instructions</a>.</p>
</div>
<div class="section" id="identify-your-toolset">
-<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id35">5.2.2 Identify Your Toolset</a></h3>
+<span id="toolset-name"></span><span id="toolset"></span><h3><a class="toc-backref" href="#id37">5.2.2 Identify Your Toolset</a></h3>
<p>First, find the toolset corresponding to your compiler in the
following table.</p>
<div class="note">
@@ -475,7 +476,7 @@
detection code) or <a class="reference internal" href="#auto-linking">auto-linking</a> will fail.</p>
</div>
<div class="section" id="select-a-build-directory">
-<span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id36">5.2.3 Select a Build Directory</a></h3>
+<span id="id12"></span><span id="build-directory"></span><h3><a class="toc-backref" href="#id38">5.2.3 Select a Build Directory</a></h3>
<p><a class="reference external" href="../../tools/build/index.html">Boost.Build</a> will place all intermediate files it generates while
building into the <strong>build directory</strong>. If your Boost root
directory is writable, this step isn't strictly necessary: by
@@ -483,21 +484,29 @@
purpose in your current working directory.</p>
</div>
<div class="section" id="invoke-bjam">
-<h3><a class="toc-backref" href="#id37">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
+<h3><a class="toc-backref" href="#id39">5.2.4 Invoke <tt class="docutils literal"><span class="pre">bjam</span></tt></a></h3>
<p>Change your current directory to the Boost root directory and
invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> as follows:</p>
<pre class="literal-block">
-bjam <strong>--build-dir=</strong><a class="reference internal" href="#id12"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> stage
+bjam <strong>--build-dir=</strong><a class="reference internal" href="#id12"><em>build-directory</em></a> <strong>--toolset=</strong><a class="reference internal" href="#toolset-name"><em>toolset-name</em></a> <em>[</em><strong>--build-type=complete</strong><em>]</em> stage
</pre>
<p>For example, your session might look like this:<a class="footnote-reference" href="#continuation" id="id13"><sup>4</sup></a></p>
<pre class="literal-block">
-C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>
-<tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt>> bjam <strong>^</strong>
+C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
+<tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>> bjam <strong>^</strong>
More? <strong>--build-dir=</strong>"C:\Documents and Settings\dave\build-boost" <strong>^</strong>
More? <strong>--toolset=</strong>msvc stage
</pre>
<p>Be sure to read <a class="reference internal" href="#continuation">this note</a> about the appearance of <tt class="docutils literal"><span class="pre">^</span></tt>,
<tt class="docutils literal"><span class="pre">More?</span></tt> and quotation marks (<tt class="docutils literal"><span class="pre">"</span></tt>) in that line.</p>
+<p>The above example session will build static and shared non-debug multi-threaded
+variations of the libraries. To build all variations:</p>
+<pre class="literal-block">
+C:\WINDOWS> cd <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>
+<tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt>> bjam <strong>^</strong>
+More? <strong>--build-dir=</strong>"C:\Documents and Settings\dave\build-boost" <strong>^</strong>
+More? <strong>--toolset=</strong>msvc <strong>--build-type=complete</strong> stage
+</pre>
<!-- Copyright David Abrahams 2006. 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) -->
@@ -525,7 +534,7 @@
</div>
</div>
<div class="section" id="expected-build-output">
-<h2><a class="toc-backref" href="#id38">5.3 Expected Build Output</a></h2>
+<h2><a class="toc-backref" href="#id40">5.3 Expected Build Output</a></h2>
<p>During the process of building Boost libraries, you can expect to
see some messages printed on the console. These may include</p>
<ul>
@@ -549,7 +558,7 @@
</ul>
</div>
<div class="section" id="in-case-of-build-errors">
-<h2><a class="toc-backref" href="#id39">5.4 In Case of Build Errors</a></h2>
+<h2><a class="toc-backref" href="#id41">5.4 In Case of Build Errors</a></h2>
<p>The only error messages you see when building Boostâif anyâshould
be related to the IOStreams library's support of zip and bzip2
formats as described <a class="reference external" href="../../libs/iostreams/doc/installation.html">here</a>. Install the relevant development
@@ -567,7 +576,7 @@
</div>
</div>
<div class="section" id="link-your-program-to-a-boost-library">
-<h1><a class="toc-backref" href="#id40">6 Link Your Program to a Boost Library</a></h1>
+<h1><a class="toc-backref" href="#id42">6 Link Your Program to a Boost Library</a></h1>
<p>To demonstrate linking with a Boost binary library, we'll use the
following simple program that extracts the subject lines from
emails. It uses the <a class="reference external" href="../../libs/regex/index.html">Boost.Regex</a> library, which has a
@@ -612,7 +621,7 @@
variant OSes</a> for the appropriate command-line options to use.</p>
</div>
<div class="section" id="link-from-within-the-visual-studio-ide">
-<h2><a class="toc-backref" href="#id41">6.1 Link From Within the Visual Studio IDE</a></h2>
+<h2><a class="toc-backref" href="#id43">6.1 Link From Within the Visual Studio IDE</a></h2>
<p>Starting with the <a class="reference internal" href="#vs-header-only">header-only example project</a> we created
earlier:</p>
<ol class="arabic simple">
@@ -620,24 +629,24 @@
select <em>Properties</em> from the resulting pop-up menu</li>
<li>In <em>Configuration Properties</em> > <em>Linker</em> > <em>Additional Library
Directories</em>, enter the path to the Boost binaries,
-e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>.</li>
+e.g. <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">\lib\</span></tt>.</li>
<li>From the <em>Build</em> menu, select <em>Build Solution</em>.</li>
</ol>
<p><a class="reference internal" href="#test-your-program"><em>skip to the next step</em></a></p>
</div>
<div class="section" id="or-link-from-the-command-prompt">
-<h2><a class="toc-backref" href="#id42">6.2 Or, Link From the Command Prompt</a></h2>
+<h2><a class="toc-backref" href="#id44">6.2 Or, Link From the Command Prompt</a></h2>
<p>For example, we can compile and link the above program from the
Visual C++ command-line by simply adding the <strong>bold</strong> text below to
the command line we used earlier, assuming your Boost binaries are
-in <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">\lib</span></tt>:</p>
+in <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\boost\</span></tt><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">\lib</span></tt>:</p>
<pre class="literal-block">
-cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt> example.cpp <strong>^</strong>
- <strong>/link /LIBPATH:</strong> <strong>C:\Program Files\boost\</strong><strong>boost_1_35_0</strong><strong>\lib</strong>
+cl /EHsc /I <em>path\to\</em><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt> example.cpp <strong>^</strong>
+ <strong>/link /LIBPATH:</strong> <strong>C:\Program Files\boost\</strong><strong>boost_1_36_0</strong><strong>\lib</strong>
</pre>
</div>
<div class="section" id="library-naming">
-<h2><a class="toc-backref" href="#id43">6.3 Library Naming</a></h2>
+<h2><a class="toc-backref" href="#id45">6.3 Library Naming</a></h2>
<div class="note">
<p class="first admonition-title">Note</p>
<p>If, like Visual C++, your compiler supports auto-linking,
@@ -737,7 +746,7 @@
<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
</div>
<div class="section" id="test-your-program">
-<h2><a class="toc-backref" href="#id44">6.4 Test Your Program</a></h2>
+<h2><a class="toc-backref" href="#id46">6.4 Test Your Program</a></h2>
<p>To test our subject extraction, we'll filter the following text
file. Copy it out of your browser and save it as <tt class="docutils literal"><span class="pre">jayne.txt</span></tt>:</p>
<pre class="literal-block">
@@ -759,7 +768,7 @@
</div>
</div>
<div class="section" id="conclusion-and-further-resources">
-<h1><a class="toc-backref" href="#id45">7 Conclusion and Further Resources</a></h1>
+<h1><a class="toc-backref" href="#id47">7 Conclusion and Further Resources</a></h1>
<p>This concludes your introduction to Boost and to integrating it
with your programs. As you start using Boost in earnest, there are
surely a few additional points you'll wish we had covered. One day
@@ -787,16 +796,17 @@
<table class="docutils footnote" frame="void" id="zip" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>If you prefer not to download executable programs,
-download <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_35_0</span></tt><tt class="docutils literal"><span class="pre">.zip</span></tt></a> and use an external tool to decompress
-it. We don't recommend using Windows' built-in decompression as
-it can be painfully slow for large archives.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id2">[1]</a></td><td>We recommend
+downloading <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041"><tt class="docutils literal"><span class="pre">boost_1_36_0</span></tt><tt class="docutils literal"><span class="pre">.7z</span></tt></a> and using <a class="reference external" href="http://www.7-zip.org">7-Zip</a> to decompress
+it. We no longer recommend .zip files for Boost because they are twice
+as large as the equivalent .7z files. We don't recommend using Windows'
+built-in decompression as it can be painfully slow for large archives.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="installer-src" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
-<tr><td class="label">[2]</td><td>If you used the <a class="reference external" href="http://www.boost-consulting.com/download/windows">installer</a> from Boost
+<tr><td class="label">[2]</td><td>If you used the <a class="reference external" href="http://www.boostpro.com/products/free">installer</a> from Boost
Consulting and deselected âSource and Documentationâ (it's
selected by default), you won't see the <tt class="docutils literal"><span class="pre">libs/</span></tt> subdirectory.
That won't affect your ability to use precompiled binaries, but
Modified: branches/proto/v4/more/getting_started/windows.rst
==============================================================================
--- branches/proto/v4/more/getting_started/windows.rst (original)
+++ branches/proto/v4/more/getting_started/windows.rst 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -35,25 +35,33 @@
Get Boost
=========
-The easiest way to get a copy of Boost is to use the `installer`_
-provided by `Boost Consulting`_. We especially recommend this
-method if you use Microsoft Visual Studio .NET 2003 or Microsoft
-Visual Studio 2005, because the installer can download and install
+The easiest way to get a copy of Boost is to use an installer.
+The `Boost website version of this Getting Started guide`_ will
+have undated information on installers as they become available,
+or see `Boost downloads`_ or the installer_ provided by `BoostPro Computing`_. We especially recommend using
+an installer if you use Microsoft Visual Studio, because the installer can download and install
precompiled library binaries, saving you the trouble of building
them yourself. To complete this tutorial, you'll need to at least
install the Boost.Regex_ binaries when given the option.
-.. _installer: http://www.boost-consulting.com/download/windows
-.. _Boost Consulting: http://www.boost-consulting.com
+.. _`Boost website version of this Getting Started guide`:
+ http://www.boost.org/doc/libs/1_36_0/more/getting_started/index.html
+.. _`Boost downloads`: `sf-download`_
+.. _installer: http://www.boostpro.com/products/free
+.. _BoostPro Computing: http://www.boostpro.com
If you're using an earlier version of Visual Studio or some other
compiler, or if you prefer to build everything yourself, you can
-download |boost.exe|_ and run it to install a complete Boost
+download |boost.7z|_ or |boost_zip|_ and unpack it to install a complete Boost
distribution. [#zip]_
-.. |boost.exe| replace:: |boost_ver|\ ``.exe``
+.. |boost.7z| replace:: |boost_ver|\ ``.7z``
-.. _`boost.exe`: `sf-download`_
+.. _`boost.7z`: `sf-download`_
+
+.. |boost_zip| replace:: |boost_ver|\ ``.zip``
+
+.. _`boost_zip`: `sf-download`_
.. include:: detail/distro.rst
@@ -175,10 +183,10 @@
.. include:: detail/binary-head.rst
-Install Visual Studio (2005 or .NET 2003) Binaries
---------------------------------------------------
+Install Visual Studio Binaries
+------------------------------
-The installer_ supplied by Boost Consulting will download and
+The installers will download and
install pre-compiled binaries into the ``lib\`` subdirectory of the
boost root, typically |default-root|\ ``\lib\``. If you installed
all variants of the Boost.Regex_ binary, you're done with this
@@ -210,6 +218,16 @@
Be sure to read `this note`__ about the appearance of ``^``,
``More?`` and quotation marks (``"``) in that line.
+The above example session will build static and shared non-debug multi-threaded
+variations of the libraries. To build all variations:
+
+.. parsed-literal::
+
+ C:\\WINDOWS> cd |default-root|
+ |default-root|> bjam **^**
+ More? **--build-dir=**\ "C:\\Documents and Settings\\dave\\build-boost" **^**
+ More? **--toolset=**\ msvc **--build-type=complete** stage
+
__ continuation_
.. include:: detail/build-from-source-tail.rst
@@ -291,10 +309,13 @@
------------------------------
-.. [#zip] If you prefer not to download executable programs,
- download |boost.zip|_ and use an external tool to decompress
- it. We don't recommend using Windows' built-in decompression as
- it can be painfully slow for large archives.
+.. [#zip] We recommend
+ downloading |boost.7z|_ and using 7-Zip_ to decompress
+ it. We no longer recommend .zip files for Boost because they are twice
+ as large as the equivalent .7z files. We don't recommend using Windows'
+ built-in decompression as it can be painfully slow for large archives.
+
+.. _7-Zip: http://www.7-zip.org
.. [#installer-src] If you used the installer_ from Boost
Consulting and deselected âSource and Documentationâ (it's
Modified: branches/proto/v4/status/explicit-failures-markup.xml
==============================================================================
--- branches/proto/v4/status/explicit-failures-markup.xml (original)
+++ branches/proto/v4/status/explicit-failures-markup.xml 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -2892,6 +2892,19 @@
It passes when the timeout value is increased.
</note>
</mark-expected-failures>
+ <mark-expected-failures>
+ <test name="lexertl3"/>
+ <test name="lexertl4"/>
+ <test name="lexertl5"/>
+ <toolset name="gcc-3.4.6_linux_ia64"/>
+ <note author="Boris Gubenko">
+ With GCC 3.4.6 the test fails with ICE: internal compiler error.
+ The footprint is similar to that in GCC Bugzilla Bug 34950
+ except 34950 is a regression introduced in GCC 4.2.3. In any
+ case, whatever the problem is, the GCC 4.x series does not seem
+ to have it: the test compiles just fine with GCC 4.x compiler.
+ </note>
+ </mark-expected-failures>
</library>
<!-- typeof -->
Modified: branches/proto/v4/tools/quickbook/test/templates.gold
==============================================================================
--- branches/proto/v4/tools/quickbook/test/templates.gold (original)
+++ branches/proto/v4/tools/quickbook/test/templates.gold 2008-08-15 22:41:17 EDT (Fri, 15 Aug 2008)
@@ -1,69 +1,72 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="templates" name="Templates" dirname="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <articleinfo>
- </articleinfo>
- <title>Templates</title>
- <section id="templates.templates">
- <title><link linkend="templates.templates">Templates</link></title>
- <para>
- nullary_arg
- </para>
- <para>
- foo baz
- </para>
- <para>
- <para>
- foo baz
- </para>
- </para>
- <para>
- <para>
- This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
- kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
- </para>
- </para>
- <para>
- <hey>baz</hey>
- </para>
- <para>
- <para>
- This is a complete paragraph. madagascar madagascar madagascar madagascar
- madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
- </para>
- </para>
- <para>
- zoom peanut zoom
- </para>
- <para>
- exactly xanadu
- </para>
- <para>
- wx
- </para>
- <para>
- wxyz wxyz trail
- </para>
- <para>
-
-<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
-<phrase role="special">{</phrase>
- <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> "Hello, World" <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
- </para>
- <para>
- x<superscript>2</superscript>
- </para>
- <para>
- α<superscript>2</superscript>
- </para>
- <para>
- x<superscript>2</superscript>
- </para>
- <para>
- got a banana?
- </para>
- </section>
-</article>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates" name="Templates" dirname="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <articleinfo>
+ </articleinfo>
+ <title>Templates</title>
+ <section id="templates.templates">
+ <title><link linkend="templates.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ <para>
+ foo baz
+ </para>
+ </para>
+ <para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> "Hello, World" <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ α<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ [join2
+ </para>
+ </section>
+</article>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk