|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67199 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/config boost/detail boost/filesystem boost/functional/hash boost/fusion boost/gil boost/graph boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/math boost/msm boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/range boost/regex boost/serialization boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/typeof boost/unordered boost/utility boost/uuid boost/variant boost/wave doc libs libs/algorithm/string libs/array/doc libs/array/test libs/bimap libs/config libs/date_time libs/filesystem libs/functional/hash libs/fusion libs/graph_parallel libs/integer libs/interprocess libs/intrusive libs/iostreams libs/math libs/math/doc libs/math/doc/sf_and_dist libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/proto/example libs/python libs/range libs/regex libs/serialization libs/serialization/doc libs/serialization/example libs/serialization/src libs/serialization/test libs/serialization/vc7ide libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/timer libs/tr1 libs/type_traits libs/type_traits/doc libs/typeof/doc libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more more/getting_started status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/regression tools/regression/src tools/release tools/wave
From: eric_at_[hidden]
Date: 2010-12-12 22:15:06
Author: eric_niebler
Date: 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
New Revision: 67199
URL: http://svn.boost.org/trac/boost/changeset/67199
Log:
Merged revisions 67198 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r67198 | eric_niebler | 2010-12-12 21:53:44 -0500 (Sun, 12 Dec 2010) | 1 line
misc example clean-up
........
Properties modified:
branches/release/ (props changed)
branches/release/INSTALL (props changed)
branches/release/Jamroot (props changed)
branches/release/LICENSE_1_0.txt (props changed)
branches/release/boost/ (props changed)
branches/release/boost-build.jam (props changed)
branches/release/boost.css (props changed)
branches/release/boost.png (props changed)
branches/release/boost/algorithm/string/ (props changed)
branches/release/boost/archive/ (props changed)
branches/release/boost/array.hpp (props changed)
branches/release/boost/bimap/ (props changed)
branches/release/boost/config/ (props changed)
branches/release/boost/config.hpp (props changed)
branches/release/boost/detail/ (props changed)
branches/release/boost/detail/endian.hpp (props changed)
branches/release/boost/filesystem/ (props changed)
branches/release/boost/filesystem.hpp (props changed)
branches/release/boost/functional/hash/ (props changed)
branches/release/boost/fusion/ (props changed)
branches/release/boost/gil/ (props changed)
branches/release/boost/graph/ (props changed)
branches/release/boost/integer/ (props changed)
branches/release/boost/interprocess/ (props changed)
branches/release/boost/intrusive/ (props changed)
branches/release/boost/io/ (props changed)
branches/release/boost/iostreams/ (props changed)
branches/release/boost/math/ (props changed)
branches/release/boost/math_fwd.hpp (props changed)
branches/release/boost/msm/ (props changed)
branches/release/boost/numeric/ublas/ (props changed)
branches/release/boost/numeric/ublas/functional.hpp (props changed)
branches/release/boost/program_options/ (props changed)
branches/release/boost/property_tree/ (props changed)
branches/release/boost/python/ (props changed)
branches/release/boost/range/ (props changed)
branches/release/boost/regex/ (props changed)
branches/release/boost/serialization/ (props changed)
branches/release/boost/signals/ (props changed)
branches/release/boost/signals2/ (props changed)
branches/release/boost/signals2.hpp (props changed)
branches/release/boost/spirit/ (props changed)
branches/release/boost/spirit/home/ (props changed)
branches/release/boost/spirit/home/karma/ (props changed)
branches/release/boost/spirit/home/support/attributes.hpp (props changed)
branches/release/boost/statechart/ (props changed)
branches/release/boost/system/ (props changed)
branches/release/boost/thread/ (props changed)
branches/release/boost/thread.hpp (props changed)
branches/release/boost/token_functions.hpp (props changed)
branches/release/boost/tr1/ (props changed)
branches/release/boost/type_traits/ (props changed)
branches/release/boost/typeof/message.hpp (props changed)
branches/release/boost/typeof/register_functions.hpp (props changed)
branches/release/boost/typeof/register_functions_iterate.hpp (props changed)
branches/release/boost/typeof/typeof.hpp (props changed)
branches/release/boost/typeof/unsupported.hpp (props changed)
branches/release/boost/unordered/ (props changed)
branches/release/boost/utility/ (props changed)
branches/release/boost/utility/value_init.hpp (props changed)
branches/release/boost/uuid/ (props changed)
branches/release/boost/variant/ (props changed)
branches/release/boost/version.hpp (props changed)
branches/release/boost/wave/ (props changed)
branches/release/bootstrap.bat (props changed)
branches/release/bootstrap.sh (props changed)
branches/release/doc/ (props changed)
branches/release/index.htm (props changed)
branches/release/index.html (props changed)
branches/release/libs/ (props changed)
branches/release/libs/algorithm/string/ (props changed)
branches/release/libs/array/doc/array.xml (props changed)
branches/release/libs/array/test/array0.cpp (props changed)
branches/release/libs/array/test/array2.cpp (props changed)
branches/release/libs/bimap/ (props changed)
branches/release/libs/config/ (props changed)
branches/release/libs/date_time/ (props changed)
branches/release/libs/filesystem/ (props changed)
branches/release/libs/functional/hash/ (props changed)
branches/release/libs/fusion/ (props changed)
branches/release/libs/graph_parallel/ (props changed)
branches/release/libs/integer/ (props changed)
branches/release/libs/interprocess/ (props changed)
branches/release/libs/intrusive/ (props changed)
branches/release/libs/iostreams/ (props changed)
branches/release/libs/libraries.htm (props changed)
branches/release/libs/maintainers.txt (props changed)
branches/release/libs/math/ (props changed)
branches/release/libs/math/doc/ (props changed)
branches/release/libs/math/doc/sf_and_dist/ (props changed)
branches/release/libs/mpi/build/ (props changed)
branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
branches/release/libs/msm/ (props changed)
branches/release/libs/numeric/ublas/ (props changed)
branches/release/libs/numeric/ublas/doc/ (props changed)
branches/release/libs/program_options/ (props changed)
branches/release/libs/property_tree/ (props changed)
branches/release/libs/python/ (props changed)
branches/release/libs/range/ (props changed)
branches/release/libs/regex/ (props changed)
branches/release/libs/serialization/ (props changed)
branches/release/libs/serialization/doc/ (props changed)
branches/release/libs/serialization/example/ (props changed)
branches/release/libs/serialization/src/ (props changed)
branches/release/libs/serialization/test/test_diamond_complex.cpp (props changed)
branches/release/libs/serialization/vc7ide/ (props changed)
branches/release/libs/signals/ (props changed)
branches/release/libs/signals2/ (props changed)
branches/release/libs/spirit/ (props changed)
branches/release/libs/spirit/classic/example/ (props changed)
branches/release/libs/spirit/doc/ (props changed)
branches/release/libs/spirit/example/ (props changed)
branches/release/libs/spirit/phoenix/ (props changed)
branches/release/libs/spirit/test/ (props changed)
branches/release/libs/spirit/test/qi/optional.cpp (props changed)
branches/release/libs/statechart/ (props changed)
branches/release/libs/static_assert/ (props changed)
branches/release/libs/system/ (props changed)
branches/release/libs/thread/ (props changed)
branches/release/libs/timer/ (props changed)
branches/release/libs/tr1/ (props changed)
branches/release/libs/type_traits/ (props changed)
branches/release/libs/type_traits/doc/ (props changed)
branches/release/libs/typeof/doc/typeof.qbk (props changed)
branches/release/libs/unordered/ (props changed)
branches/release/libs/utility/ (props changed)
branches/release/libs/utility/swap.html (props changed)
branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
branches/release/libs/utility/value_init.htm (props changed)
branches/release/libs/utility/value_init_test.cpp (props changed)
branches/release/libs/uuid/ (props changed)
branches/release/libs/wave/ (props changed)
branches/release/more/ (props changed)
branches/release/more/getting_started/ (props changed)
branches/release/rst.css (props changed)
branches/release/status/ (props changed)
branches/release/status/Jamfile.v2 (props changed)
branches/release/status/explicit-failures-markup.xml (props changed)
branches/release/tools/ (props changed)
branches/release/tools/bcp/ (props changed)
branches/release/tools/boostbook/ (props changed)
branches/release/tools/build/v2/ (props changed)
branches/release/tools/inspect/ (props changed)
branches/release/tools/quickbook/ (props changed)
branches/release/tools/regression/ (props changed)
branches/release/tools/regression/src/library_status.cpp (props changed)
branches/release/tools/release/ (props changed)
branches/release/tools/wave/ (props changed)
Text files modified:
branches/release/libs/proto/example/calc2.cpp | 23 +++++++++--------------
branches/release/libs/proto/example/calc3.cpp | 17 ++++++++---------
branches/release/libs/proto/example/futures.cpp | 11 ++++-------
branches/release/libs/proto/example/hello.cpp | 1 +
branches/release/libs/proto/example/lazy_vector.cpp | 22 ++++++++++------------
branches/release/libs/proto/example/mixed.cpp | 2 +-
6 files changed, 33 insertions(+), 43 deletions(-)
Modified: branches/release/libs/proto/example/calc2.cpp
==============================================================================
--- branches/release/libs/proto/example/calc2.cpp (original)
+++ branches/release/libs/proto/example/calc2.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -16,13 +16,17 @@
namespace proto = boost::proto;
using proto::_;
+template<typename Expr>
+struct calculator_expression;
+
+// Tell proto how to generate expressions in the calculator_domain
+struct calculator_domain
+ : proto::domain<proto::generator<calculator_expression> >
+{};
+
// Will be used to define the placeholders _1 and _2
template<int I> struct placeholder {};
-// For expressions in the calculator domain, operator ()
-// will be special; it will evaluate the expression.
-struct calculator_domain;
-
// Define a calculator context, for evaluating arithmetic expressions
// (This is as before, in calc1.cpp)
struct calculator_context
@@ -54,12 +58,8 @@
struct calculator_expression
: proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
{
- typedef
- proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
- base_type;
-
explicit calculator_expression(Expr const &expr = Expr())
- : base_type(expr)
+ : calculator_expression::proto_extends(expr)
{}
BOOST_PROTO_EXTENDS_USING_ASSIGN(calculator_expression)
@@ -84,11 +84,6 @@
}
};
-// Tell proto how to generate expressions in the calculator_domain
-struct calculator_domain
- : proto::domain<proto::generator<calculator_expression> >
-{};
-
// Define some placeholders (notice they're wrapped in calculator_expression<>)
calculator_expression<proto::terminal< placeholder< 1 > >::type> const _1;
calculator_expression<proto::terminal< placeholder< 2 > >::type> const _2;
Modified: branches/release/libs/proto/example/calc3.cpp
==============================================================================
--- branches/release/libs/proto/example/calc3.cpp (original)
+++ branches/release/libs/proto/example/calc3.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -51,12 +51,16 @@
// is not used, is mpl::void_.
template<typename Expr>
struct calculator_arity
- : boost::result_of<CalculatorGrammar(Expr, mpl::int_<0>, mpl::void_)>
+ : boost::result_of<CalculatorGrammar(Expr)>
{};
-// For expressions in the calculator domain, operator ()
-// will be special; it will evaluate the expression.
-struct calculator_domain;
+template<typename Expr>
+struct calculator_expression;
+
+// Tell proto how to generate expressions in the calculator_domain
+struct calculator_domain
+ : proto::domain<proto::generator<calculator_expression> >
+{};
// Define a calculator context, for evaluating arithmetic expressions
// (This is as before, in calc1.cpp and calc2.cpp)
@@ -125,11 +129,6 @@
}
};
-// Tell proto how to generate expressions in the calculator_domain
-struct calculator_domain
- : proto::domain<proto::generator<calculator_expression> >
-{};
-
// Define some placeholders (notice they're wrapped in calculator_expression<>)
calculator_expression<proto::terminal< placeholder< mpl::int_<1> > >::type> const _1;
calculator_expression<proto::terminal< placeholder< mpl::int_<2> > >::type> const _2;
Modified: branches/release/libs/proto/example/futures.cpp
==============================================================================
--- branches/release/libs/proto/example/futures.cpp (original)
+++ branches/release/libs/proto/example/futures.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -80,16 +80,15 @@
: proto::extends<E, future_expr<E>, future_dom>
{
explicit future_expr(E const &e)
- : proto::extends<E, future_expr<E>, future_dom>(e)
+ : future_expr::proto_extends(e)
{}
typename fusion::result_of::as_vector<
- typename boost::result_of<FutureGroup(E,int,int)>::type
+ typename boost::result_of<FutureGroup(E)>::type
>::type
get() const
{
- int i = 0;
- return fusion::as_vector(FutureGroup()(*this, i, i));
+ return fusion::as_vector(FutureGroup()(*this));
}
};
@@ -100,9 +99,7 @@
: future_expr<typename proto::terminal<T>::type>
{
future(T const &t = T())
- : future_expr<typename proto::terminal<T>::type>(
- proto::terminal<T>::type::make(t)
- )
+ : future::proto_derived_expr(future::proto_base_expr::make(t))
{}
T get() const
Modified: branches/release/libs/proto/example/hello.cpp
==============================================================================
--- branches/release/libs/proto/example/hello.cpp (original)
+++ branches/release/libs/proto/example/hello.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -7,6 +7,7 @@
#include <iostream>
#include <boost/proto/core.hpp>
#include <boost/proto/context.hpp>
+// This #include is only needed for compilers that use typeof emulation:
#include <boost/typeof/std/ostream.hpp>
namespace proto = boost::proto;
Modified: branches/release/libs/proto/example/lazy_vector.cpp
==============================================================================
--- branches/release/libs/proto/example/lazy_vector.cpp (original)
+++ branches/release/libs/proto/example/lazy_vector.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -21,6 +21,9 @@
namespace proto = boost::proto;
using proto::_;
+template<typename Expr>
+struct lazy_vector_expr;
+
// This grammar describes which lazy vector expressions
// are allowed; namely, vector terminals and addition
// and subtraction of lazy vector expressions.
@@ -32,9 +35,12 @@
>
{};
-// Expressions in the lazy vector domain must conform
-// to the lazy vector grammar
-struct lazy_vector_domain;
+// Tell proto that in the lazy_vector_domain, all
+// expressions should be wrapped in laxy_vector_expr<>
+// and must conform to the lazy vector grammar.
+struct lazy_vector_domain
+ : proto::domain<proto::generator<lazy_vector_expr>, LazyVectorGrammar>
+{};
// Here is an evaluation context that indexes into a lazy vector
// expression, and combines the result.
@@ -72,10 +78,8 @@
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;
-
lazy_vector_expr( Expr const & expr = Expr() )
- : base_type( expr )
+ : lazy_vector_expr::proto_extends( expr )
{}
// Use the lazy_subscript_context<> to implement subscripting
@@ -115,12 +119,6 @@
}
};
-// Tell proto that in the lazy_vector_domain, all
-// expressions should be wrapped in laxy_vector_expr<>
-struct lazy_vector_domain
- : proto::domain<proto::generator<lazy_vector_expr>, LazyVectorGrammar>
-{};
-
int main()
{
// lazy_vectors with 4 elements each.
Modified: branches/release/libs/proto/example/mixed.cpp
==============================================================================
--- branches/release/libs/proto/example/mixed.cpp (original)
+++ branches/release/libs/proto/example/mixed.cpp 2010-12-12 22:15:04 EST (Sun, 12 Dec 2010)
@@ -182,7 +182,7 @@
: proto::extends<Expr, MixedExpr<Expr>, MixedDomain>
{
explicit MixedExpr(Expr const &expr)
- : proto::extends<Expr, MixedExpr<Expr>, MixedDomain>(expr)
+ : MixedExpr::proto_extends(expr)
{}
private:
// hide this:
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