Imported Upstream version 1.51.0
[platform/upstream/boost.git] / boost / spirit / home / phoenix / core / nothing.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2007 Joel de Guzman
3
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef PHOENIX_CORE_NOTHING_HPP
8 #define PHOENIX_CORE_NOTHING_HPP
9
10 #include <boost/spirit/home/phoenix/core/actor.hpp>
11 #include <boost/mpl/bool.hpp>
12
13 namespace boost { namespace phoenix
14 {
15 ///////////////////////////////////////////////////////////////////////////////
16 //
17 //  null_actor
18 //
19 //      A actor that does nothing (a "bum", if you will :-).
20 //
21 ///////////////////////////////////////////////////////////////////////////////
22     struct null_actor
23     {
24         typedef mpl::false_ no_nullary;
25
26         template <typename Env>
27         struct result
28         {
29             typedef void type;
30         };
31
32         template <typename Env>
33         void
34         eval(Env const&) const
35         {
36         }
37     };
38
39     actor<null_actor> const nothing = null_actor();
40 }}
41
42 #endif