|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2008-05-29 19:33:09
Author: eric_niebler
Date: 2008-05-29 19:33:08 EDT (Thu, 29 May 2008)
New Revision: 45929
URL: http://svn.boost.org/trac/boost/changeset/45929
Log:
fix lambda example
Text files modified:
branches/proto/v4/libs/proto/example/lambda.hpp | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
Modified: branches/proto/v4/libs/proto/example/lambda.hpp
==============================================================================
--- branches/proto/v4/libs/proto/example/lambda.hpp (original)
+++ branches/proto/v4/libs/proto/example/lambda.hpp 2008-05-29 19:33:08 EDT (Thu, 29 May 2008)
@@ -650,9 +650,23 @@
typedef llexpr<proto::terminal<exception_placeholder>::type> placeholderE_type;
placeholderE_type const _e = {{{}}};
- struct byref_domain
- : proto::domain<proto::pod_generator<llexpr> >
- {};
+ template<typename T>
+ struct byref
+ {
+ typedef llexpr<typename proto::terminal<T &>::type> type;
+ };
+
+ template<typename T>
+ struct byref<llexpr<T> >
+ {
+ typedef llexpr<T> &type;
+ };
+
+ template<typename T>
+ struct byref<llexpr<T> const>
+ {
+ typedef llexpr<T> const &type;
+ };
namespace exprns_
{
@@ -663,7 +677,7 @@
typename proto::result_of::make_expr< \
TAG \
, lldomain \
- , typename proto::result_of::as_child<T, byref_domain>::type \
+ , typename byref<T>::type \
, U & \
>::type const \
operator OP(T &t, U &u) \
@@ -674,7 +688,7 @@
typename proto::result_of::make_expr< \
TAG \
, lldomain \
- , typename proto::result_of::as_child<T, byref_domain>::type \
+ , typename byref<T>::type \
, U const & \
>::type const \
operator OP(T &t, U const &u) \
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