diff options
author | Vlad Voicu <vladv@rosedu.org> | 2012-03-02 10:01:11 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-09 15:04:05 (GMT) |
commit | 1c8cd160b79b6bbcec72042bdb104ba530508a93 (patch) | |
tree | cff302b81e74c557fbc9e30fd43144d981b613d0 /3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp | |
parent | 2944711aefec9a9dd66052440bc4f921910dd780 (diff) | |
download | swift-contrib-1c8cd160b79b6bbcec72042bdb104ba530508a93.zip swift-contrib-1c8cd160b79b6bbcec72042bdb104ba530508a93.tar.bz2 |
Added spirit to bundled boost
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp new file mode 100644 index 0000000..36f0aac --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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) +==============================================================================*/ +#ifndef PHOENIX_CORE_AS_ACTOR_HPP +#define PHOENIX_CORE_AS_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> + +namespace boost { namespace phoenix +{ + template <typename T> + struct as_actor_base; // defined in value.hpp + + template <typename Base> + struct as_actor_base<actor<Base> > + { + typedef Base type; + + static Base const& + convert(actor<Base> const& x) + { + return x; + } + }; + + template <> + struct as_actor_base<fusion::void_> + { + typedef fusion::void_ type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <> + struct as_actor_base<void> + { + typedef void type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <typename T> + struct as_actor + { + typedef actor<typename as_actor_base<T>::type> type; + + static type + convert(T const& x) + { + return as_actor_base<T>::convert(x); + } + }; +}} + +#endif |