Update of /cvsroot/boost/boost/boost/bimap/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27231/detail

Modified Files:
        bimap_core.hpp map_view_base.hpp 
Log Message:
extra typedefs support (i. e. left_local_iterator for unordered_map_view)

Index: bimap_core.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/bimap/detail/bimap_core.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- bimap_core.hpp      26 May 2007 17:23:15 -0000      1.2
+++ bimap_core.hpp      27 May 2007 05:40:24 -0000      1.3
@@ -486,6 +486,30 @@
     typedef bimap_core bimap_core_;
 };
 
+// Two auxiliar metafunctions to compute the map view types
+// The map view type can not be computed inside the bimap core because a 
+// they need the bimap core to be parsed first.
+
+template< class BimapBaseType >
+struct left_map_view_type
+{
+       typedef BOOST_DEDUCED_TYPENAME BimapBaseType::left_set_type 
left_set_type;
+    typedef BOOST_DEDUCED_TYPENAME
+        left_set_type::BOOST_NESTED_TEMPLATE map_view_bind<
+            BOOST_DEDUCED_TYPENAME BimapBaseType::left_tag, BimapBaseType
+        >::type type;
+};
+
+template< class BimapBaseType >
+struct right_map_view_type
+{
+       typedef BOOST_DEDUCED_TYPENAME BimapBaseType::right_set_type 
right_set_type;
+    typedef BOOST_DEDUCED_TYPENAME
+        right_set_type::BOOST_NESTED_TEMPLATE map_view_bind<
+            BOOST_DEDUCED_TYPENAME BimapBaseType::right_tag, BimapBaseType
+        >::type type;
+};
+
 } // namespace detail
 } // namespace bimaps
 } // namespace boost

Index: map_view_base.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/bimap/detail/map_view_base.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- map_view_base.hpp   26 May 2007 02:49:07 -0000      1.2
+++ map_view_base.hpp   27 May 2007 05:40:24 -0000      1.3
@@ -19,6 +19,7 @@
 #include <boost/config.hpp>
 
 #include <stdexcept>
+#include <utility>
 
 #include <boost/type_traits/is_const.hpp>
 #include <boost/mpl/if.hpp>
@@ -398,6 +399,15 @@
     >::type type;
 };
 
+// Map views specialize the following structs to provide to the bimap class
+// the extra side typedefs (i.e. left_local_iterator for unordered_maps, 
+// right_range_type for maps)
+
+template< class MapView >
+struct  left_map_view_extra_typedefs {};
+
+template< class MapView >
+struct right_map_view_extra_typedefs {};
 
 } // namespace detail
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to