Index: fusion.hpp =================================================================== --- fusion.hpp (revision 73644) +++ fusion.hpp (working copy) @@ -8,5 +8,6 @@ #define PHOENIX_FUSION_HPP #include +#include #endif Index: fusion/at_key.hpp =================================================================== --- fusion/at_key.hpp (revision 0) +++ fusion/at_key.hpp (revision 0) @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2005-2008 Hartmut Kaiser + Copyright (c) 2005-2007 Joel de Guzman + Copyright (c) 2011 Michael Caisse + + 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_SEQUENCE_AT_KEY_HPP +#define PHOENIX_SEQUENCE_AT_KEY_HPP + +#include +#include +#include +#include + +namespace boost { namespace phoenix +{ + template + struct at_key_eval + { + template + struct result + { + typedef typename Tuple::template result::type tuple; + typedef typename + fusion::result_of::at_key< + typename remove_reference::type, Key + >::type + type; + }; + + template + static RT + eval(Env const& env, Tuple const& t) + { + return fusion::at_key(t.eval(env)); + } + }; + + template + inline actor, Tuple>::type> + at_key(Tuple const& tup) + { + return compose >(tup); + } + +}} + +#endif