Chris@16
|
1 // Boost Lambda Library -- control_constructs_common.hpp -------------------
|
Chris@16
|
2
|
Chris@16
|
3 // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
Chris@16
|
4 // Copyright (C) 2000 Gary Powell (powellg@amazon.com)
|
Chris@16
|
5 //
|
Chris@16
|
6 // Distributed under the Boost Software License, Version 1.0. (See
|
Chris@16
|
7 // accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
8 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
9 //
|
Chris@16
|
10 // For more information, see www.boost.org
|
Chris@16
|
11
|
Chris@16
|
12 // --------------------------------------------------------------------------
|
Chris@16
|
13
|
Chris@16
|
14 #if !defined(BOOST_CONTROL_CONSTRUCTS_COMMON_HPP)
|
Chris@16
|
15 #define BOOST_CONTROL_CONSTRUCTS_COMMON_HPP
|
Chris@16
|
16
|
Chris@16
|
17 namespace boost {
|
Chris@16
|
18 namespace lambda {
|
Chris@16
|
19
|
Chris@16
|
20 // special types of lambda functors, used with control structures
|
Chris@16
|
21 // to guarantee that they are composed correctly.
|
Chris@16
|
22
|
Chris@16
|
23 template<class Tag, class LambdaFunctor>
|
Chris@16
|
24 class tagged_lambda_functor;
|
Chris@16
|
25
|
Chris@16
|
26 template<class Tag, class Args>
|
Chris@16
|
27 class tagged_lambda_functor<Tag, lambda_functor<Args> >
|
Chris@16
|
28 : public lambda_functor<Args>
|
Chris@16
|
29 {
|
Chris@16
|
30 public:
|
Chris@16
|
31 tagged_lambda_functor(const Args& a) : lambda_functor<Args>(a) {}
|
Chris@16
|
32
|
Chris@16
|
33 tagged_lambda_functor(const lambda_functor<Args>& a)
|
Chris@16
|
34 : lambda_functor<Args>(a) {}
|
Chris@16
|
35
|
Chris@16
|
36 // for the no body cases in control structures.
|
Chris@16
|
37 tagged_lambda_functor() : lambda_functor<Args>() {}
|
Chris@16
|
38 };
|
Chris@16
|
39
|
Chris@16
|
40 } // lambda
|
Chris@16
|
41 } // boost
|
Chris@16
|
42
|
Chris@16
|
43 #endif // BOOST_CONTROL_CONSTRUCTS_COMMON_HPP
|
Chris@16
|
44
|
Chris@16
|
45
|
Chris@16
|
46
|
Chris@16
|
47
|
Chris@16
|
48
|
Chris@16
|
49
|
Chris@16
|
50
|