Update of /cvsroot/boost/boost/boost/fusion/sequence/view/zip_view
In directory 
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5109/sequence/view/zip_view

Modified Files:
        zip_view.hpp 
Log Message:
result_of and polymorphic function obj compatibility

Index: zip_view.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/fusion/sequence/view/zip_view/zip_view.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- zip_view.hpp        19 Mar 2007 18:13:24 -0000      1.6
+++ zip_view.hpp        11 Jun 2007 07:01:04 -0000      1.7
@@ -32,6 +32,7 @@
 #include <boost/mpl/find_if.hpp>
 #include <boost/mpl/equal_to.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
 
 #include <boost/type_traits/remove_reference.hpp>
 #include <boost/type_traits/is_reference.hpp>
@@ -47,27 +48,31 @@
 
         struct seq_ref_size
         {
-            template<typename Seq, 
-                typename SeqClass = typename remove_reference<Seq>::type, 
-                bool HasSize = traits::is_forward<SeqClass>::value
-                >
-            struct result
-                : result_of::size<SeqClass>
-            {};
+            template<typename Params>
+            struct result;
 
-            static int const int_max = static_cast<int>(
-                static_cast<unsigned>(~0) >> 1);
+            template<typename Seq>
+            struct result<seq_ref_size(Seq)>
+            {
+                static int const int_max = static_cast<int>(
+                    static_cast<unsigned>(~0) >> 1);
 
-            template<typename Seq, typename SeqClass>
-            struct result<Seq, SeqClass, false>
-                : mpl::int_<int_max>
-            {}; 
+                typedef typename remove_reference<Seq>::type SeqClass;
+
+                typedef typename mpl::eval_if<
+                    traits::is_forward<SeqClass>,
+                    result_of::size<SeqClass>,
+                    mpl::int_<int_max> >::type type;
+            };
         };
 
         struct poly_min
         {
+            template<typename T>
+            struct result;
+
             template<typename Lhs, typename Rhs>
-            struct result
+            struct result<poly_min(Lhs, Rhs)>
                 : mpl::min<Lhs, Rhs>
             {};
         };


-------------------------------------------------------------------------
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