Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // -- Boost Lambda Library - actions.hpp ----------------------------------
3 // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi)
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // For more information, see www.boost.org
11 // ----------------------------------------------------------------
13 #ifndef BOOST_LAMBDA_ACTIONS_HPP
14 #define BOOST_LAMBDA_ACTIONS_HPP
21 template<int Arity, class Act> class action;
23 // these need to be defined here, since the corresponding lambda
24 // functions are members of lambda_functor classes
26 class assignment_action {};
27 class subscript_action {};
29 template <class Action> class other_action;
31 // action for specifying the explicit return type
32 template <class RET> class explicit_return_type_action {};
34 // action for preventing the expansion of a lambda expression
35 struct protect_action {};
37 // must be defined here, comma is a special case
38 struct comma_action {};
41 // actions, for which the existence of protect is checked in return type
44 template <class Action> struct is_protectable {
45 BOOST_STATIC_CONSTANT(bool, value = false);
48 // NOTE: comma action is protectable. Other protectable actions
49 // are listed in operator_actions.hpp
51 template<> struct is_protectable<other_action<comma_action> > {
52 BOOST_STATIC_CONSTANT(bool, value = true);
58 // this type is used in return type deductions to signal that deduction
59 // did not find a result. It does not necessarily mean an error, it commonly
60 // means that something else should be tried.
64 // function action is a special case: bind functions can be called with
65 // the return type specialized explicitly e.g. bind<int>(foo);
66 // If this call syntax is used, the return type is stored in the latter
67 // argument of function_action template. Otherwise the argument gets the type
69 // This argument is only relevant in the return type deduction code
70 template <int I, class Result_type = detail::unspecified>
71 class function_action {};
73 template<class T> class function_action<1, T> {
75 template<class RET, class A1>
76 static RET apply(A1& a1) {
77 return function_adaptor<typename boost::remove_cv<A1>::type>::
78 template apply<RET>(a1);
82 template<class T> class function_action<2, T> {
84 template<class RET, class A1, class A2>
85 static RET apply(A1& a1, A2& a2) {
86 return function_adaptor<typename boost::remove_cv<A1>::type>::
87 template apply<RET>(a1, a2);
91 template<class T> class function_action<3, T> {
93 template<class RET, class A1, class A2, class A3>
94 static RET apply(A1& a1, A2& a2, A3& a3) {
95 return function_adaptor<typename boost::remove_cv<A1>::type>::
96 template apply<RET>(a1, a2, a3);
100 template<class T> class function_action<4, T> {
102 template<class RET, class A1, class A2, class A3, class A4>
103 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) {
104 return function_adaptor<typename boost::remove_cv<A1>::type>::
105 template apply<RET>(a1, a2, a3, a4);
109 template<class T> class function_action<5, T> {
111 template<class RET, class A1, class A2, class A3, class A4, class A5>
112 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) {
113 return function_adaptor<typename boost::remove_cv<A1>::type>::
114 template apply<RET>(a1, a2, a3, a4, a5);
118 template<class T> class function_action<6, T> {
120 template<class RET, class A1, class A2, class A3, class A4, class A5,
122 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) {
123 return function_adaptor<typename boost::remove_cv<A1>::type>::
124 template apply<RET>(a1, a2, a3, a4, a5, a6);
128 template<class T> class function_action<7, T> {
130 template<class RET, class A1, class A2, class A3, class A4, class A5,
132 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) {
133 return function_adaptor<typename boost::remove_cv<A1>::type>::
134 template apply<RET>(a1, a2, a3, a4, a5, a6, a7);
138 template<class T> class function_action<8, T> {
140 template<class RET, class A1, class A2, class A3, class A4, class A5,
141 class A6, class A7, class A8>
142 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
144 return function_adaptor<typename boost::remove_cv<A1>::type>::
145 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8);
149 template<class T> class function_action<9, T> {
151 template<class RET, class A1, class A2, class A3, class A4, class A5,
152 class A6, class A7, class A8, class A9>
153 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
155 return function_adaptor<typename boost::remove_cv<A1>::type>::
156 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9);
160 template<class T> class function_action<10, T> {
162 template<class RET, class A1, class A2, class A3, class A4, class A5,
163 class A6, class A7, class A8, class A9, class A10>
164 static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7,
165 A8& a8, A9& a9, A10& a10) {
166 return function_adaptor<typename boost::remove_cv<A1>::type>::
167 template apply<RET>(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
171 } // namespace lambda