diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 33176dc9..09b01291 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -43,6 +43,21 @@ namespace boost { namespace fusion } }; + template + struct push_front_deque; + + template + struct push_front_deque> + { + typedef deque type; + + static type + call(T const& first, deque const& rest) + { + return type(front_extended_deque, T>(rest, first)); + } + }; + template struct build_deque { @@ -50,16 +65,19 @@ namespace boost { namespace fusion build_deque::type, Last> next_build_deque; - typedef front_extended_deque< - typename next_build_deque::type - , typename result_of::value_of::type> - type; + typedef push_front_deque< + typename result_of::value_of::type + , typename next_build_deque::type> + push_front; + + typedef typename push_front::type type; static type call(First const& f, Last const& l) { typename result_of::value_of::type v = *f; - return type(next_build_deque::call(fusion::next(f), l), v); + return push_front::call( + v, next_build_deque::call(fusion::next(f), l)); } }; } @@ -102,6 +120,7 @@ namespace boost { namespace fusion #include #include #include +#include namespace boost { namespace fusion {