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