|
Boost-Commit : |
From: eric_at_[hidden]
Date: 2007-12-08 22:38:47
Author: eric_niebler
Date: 2007-12-08 22:38:47 EST (Sat, 08 Dec 2007)
New Revision: 41917
URL: http://svn.boost.org/trac/boost/changeset/41917
Log:
more changes for result_of
Text files modified:
branches/proto/v3/boost/xpressive/proto/transform/arg.hpp | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
Modified: branches/proto/v3/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/proto/transform/arg.hpp (original)
+++ branches/proto/v3/boost/xpressive/proto/transform/arg.hpp 2007-12-08 22:38:47 EST (Sat, 08 Dec 2007)
@@ -12,6 +12,24 @@
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/traits.hpp>
+#define CV(T)\
+ typename add_const<T>::type
+
+#define REF(T)\
+ typename add_reference<T>::type
+
+#define CVREF(T)\
+ REF(CV(T))
+
+#define UNCV(T)\
+ typename remove_cv<T>::type
+
+#define UNREF(T)\
+ typename remove_reference<T>::type
+
+#define UNCVREF(T)\
+ UNCV(UNREF(T))
+
namespace boost { namespace proto
{
@@ -26,7 +44,7 @@
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
{
- typedef Expr type;
+ typedef CVREF(UNREF(Expr)) type;
};
template<typename Expr, typename State, typename Visitor>
@@ -83,7 +101,7 @@
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::arg_c<Expr, I>
+ : proto::result_of::arg_c<CVREF(UNREF(Expr)), I>
{};
template<typename Expr, typename State, typename Visitor>
@@ -141,4 +159,11 @@
}}
+#undef CV
+#undef REF
+#undef CVREF
+#undef UNCV
+#undef UNREF
+#undef UNCVREF
+
#endif
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