Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-05-18 19:17:14


Author: eric_niebler
Date: 2008-05-18 19:17:13 EDT (Sun, 18 May 2008)
New Revision: 45502
URL: http://svn.boost.org/trac/boost/changeset/45502

Log:
add result_of::flatten metafunction
Text files modified:
   branches/proto/v4/boost/proto/fusion.hpp | 14 ++++++++++++++
   1 files changed, 14 insertions(+), 0 deletions(-)

Modified: branches/proto/v4/boost/proto/fusion.hpp
==============================================================================
--- branches/proto/v4/boost/proto/fusion.hpp (original)
+++ branches/proto/v4/boost/proto/fusion.hpp 2008-05-18 19:17:13 EDT (Sun, 18 May 2008)
@@ -116,7 +116,21 @@
                 return typename result<as_element(Expr const &)>::type(expr);
             }
         };
+ }
+
+ namespace result_of
+ {
+ template<typename Expr>
+ struct flatten
+ {
+ typedef detail::flat_view<Expr const> type;
+ };
 
+ template<typename Expr>
+ struct flatten<Expr &>
+ {
+ typedef detail::flat_view<Expr const> type;
+ };
     }
 
     namespace functional


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