Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / fusion / container / map / detail / end_impl.hpp
index 1375b7a..fea45db 100644 (file)
@@ -1,43 +1,40 @@
 /*=============================================================================
-    Copyright (c) 2001-2011 Joel de Guzman
-    Copyright (c) 2009 Christopher Schmidt
+    Copyright (c) 2005-2013 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(BOOST_FUSION_MAP_END_IMPL_02042013_0857)
+#define BOOST_FUSION_MAP_END_IMPL_02042013_0857
 
-#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
-#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
+#include <boost/fusion/support/config.hpp>
+#include <boost/fusion/container/map/map_iterator.hpp>
 
-#include <boost/fusion/iterator/basic_iterator.hpp>
-
-namespace boost { namespace fusion { namespace extension
+namespace boost { namespace fusion
 {
-    template <typename>
-    struct end_impl;
+    struct map_tag;
 
-    template <>
-    struct end_impl<map_tag>
+    namespace extension
     {
-        template <typename Seq>
-        struct apply
-        {
-            typedef
-                basic_iterator<
-                    map_iterator_tag
-                  , typename Seq::category
-                  , Seq
-                  , Seq::size::value
-                >
-            type;
+        template<typename T>
+        struct end_impl;
 
-            static type
-            call(Seq& seq)
+        template<>
+        struct end_impl<map_tag>
+        {
+            template<typename Sequence>
+            struct apply
             {
-                return type(seq,0);
-            }
+                typedef map_iterator<Sequence, Sequence::size::value> type;
+
+                BOOST_FUSION_GPU_ENABLED
+                static type call(Sequence& seq)
+                {
+                    return type(seq);
+                }
+            };
         };
-    };
-}}}
+    }
+}}
 
 #endif