X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Ffusion%2Falgorithm%2Ftransformation%2Fpush_front.hpp;fp=boost%2Ffusion%2Falgorithm%2Ftransformation%2Fpush_front.hpp;h=abe7faadeadfd35157dab95187537d355f4fcdbd;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/fusion/algorithm/transformation/push_front.hpp b/boost/fusion/algorithm/transformation/push_front.hpp new file mode 100644 index 0000000..abe7faa --- /dev/null +++ b/boost/fusion/algorithm/transformation/push_front.hpp @@ -0,0 +1,46 @@ +/*============================================================================= + Copyright (c) 2001-2011 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) +==============================================================================*/ +#if !defined(FUSION_PUSH_FRONT_07162005_0749) +#define FUSION_PUSH_FRONT_07162005_0749 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct push_front + { + typedef fusion::single_view::type> single_view; + typedef joint_view type; + }; + } + + template + inline + typename + lazy_enable_if< + traits::is_sequence + , result_of::push_front + >::type + push_front(Sequence const& seq, T const& x) + { + typedef typename result_of::push_front push_front; + typedef typename push_front::single_view single_view; + typedef typename push_front::type result; + single_view x_(x); + return result(x_, seq); + } +}} + +#endif +