Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66526 - sandbox/SOC/2010/phoenix3/boost/phoenix/operator/detail
From: thom.heller_at_[hidden]
Date: 2010-11-12 10:19:45


Author: theller
Date: 2010-11-12 10:19:44 EST (Fri, 12 Nov 2010)
New Revision: 66526
URL: http://svn.boost.org/trac/boost/changeset/66526

Log:
forgot operator details
Added:
   sandbox/SOC/2010/phoenix3/boost/phoenix/operator/detail/
   sandbox/SOC/2010/phoenix3/boost/phoenix/operator/detail/mem_fun_ptr_gen.hpp (contents, props changed)

Added: sandbox/SOC/2010/phoenix3/boost/phoenix/operator/detail/mem_fun_ptr_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/boost/phoenix/operator/detail/mem_fun_ptr_gen.hpp 2010-11-12 10:19:44 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,114 @@
+/*==============================================================================
+ Copyright (c) 2001-2010 Joel de Guzman
+ Copyright (c) 2010 Thomas Heller
+
+ 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)
+==============================================================================*/
+
+#if !PHOENIX_IS_ITERATING
+
+#ifndef PHOENIX_OPERATOR_MEMBER_DETAIL_MEM_FUN_PTR_GEN_HPP
+#define PHOENIX_OPERATOR_MEMBER_DETAIL_MEM_FUN_PTR_GEN_HPP
+
+namespace boost { namespace phoenix
+{
+ namespace tag
+ {
+ struct mem_fun_ptr {};
+ }
+
+ namespace detail {
+ namespace result_of
+ {
+ template <typename Object, typename MemPtr,
+ PHOENIX_typename_A_void(PHOENIX_MEMBER_LIMIT)
+ , typename Dummy = void>
+ struct mem_fun_ptr_gen;
+
+ template <typename Object, typename MemPtr>
+ struct mem_fun_ptr_gen<Object, MemPtr>
+ : proto::result_of::make_expr<
+ tag::mem_fun_ptr
+ , phoenix_domain
+ , MemPtr
+ , Object>
+ {};
+
+#define PHOENIX_ITERATE_RESULT_OF 1
+#define PHOENIX_ITERATION_PARAMS \
+ (4, (1, PHOENIX_MEMBER_LIMIT, \
+ <boost/phoenix/operator/detail/mem_fun_ptr_gen.hpp>, \
+ PHOENIX_ITERATE_RESULT_OF))
+#include PHOENIX_ITERATE()
+#undef PHOENIX_ITERATE_RESULT_OF
+
+ }
+
+ template <typename Object, typename MemPtr>
+ struct mem_fun_ptr_gen
+ {
+ mem_fun_ptr_gen(Object const& obj, MemPtr ptr)
+ : obj(obj)
+ , ptr(ptr)
+ {}
+
+ typename result_of::mem_fun_ptr_gen<Object, MemPtr>::type const
+ operator()() const
+ {
+ return proto::make_expr<
+ tag::mem_fun_ptr, phoenix_domain>(ptr, obj);
+ }
+
+#define PHOENIX_ITERATE_OPERATOR 2
+#define PHOENIX_ITERATION_PARAMS \
+ (4, (1, PHOENIX_MEMBER_LIMIT, \
+ <boost/phoenix/operator/detail/mem_fun_ptr_gen.hpp>, \
+ PHOENIX_ITERATE_OPERATOR))
+#include PHOENIX_ITERATE()
+#undef PHOENIX_ITERATE_OPERATOR
+
+ Object const& obj;
+ MemPtr ptr;
+
+ };
+
+ }
+}}
+
+#endif
+
+#else
+
+#if BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_RESULT_OF
+
+ template <typename Object, typename MemPtr, PHOENIX_typename_A>
+ struct mem_fun_ptr_gen<Object, MemPtr, PHOENIX_A>
+ : proto::result_of::make_expr<
+ tag::mem_fun_ptr
+ , phoenix_domain
+ , MemPtr
+ , Object
+ , PHOENIX_A>
+ {};
+
+#elif BOOST_PP_ITERATION_FLAGS() == PHOENIX_ITERATE_OPERATOR
+
+ template <PHOENIX_typename_A>
+ typename result_of::mem_fun_ptr_gen<Object, MemPtr, PHOENIX_A>::type const
+ operator()(PHOENIX_A_const_ref_a) const
+ {
+ return proto::make_expr<
+ tag::mem_fun_ptr, phoenix_domain>(ptr, obj, PHOENIX_a);
+ }
+
+ template <PHOENIX_typename_A>
+ typename result_of::mem_fun_ptr_gen<Object, MemPtr, PHOENIX_A>::type const
+ operator()(PHOENIX_A_ref_a) const
+ {
+ return proto::make_expr<
+ tag::mem_fun_ptr, phoenix_domain>(ptr, obj, PHOENIX_a);
+ }
+
+#endif
+#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