Update of /cvsroot/boost/boost/boost/parameter
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12531

Modified Files:
        python.hpp 
Log Message:
Fixed 0-arity init.


Index: python.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/parameter/python.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- python.hpp  7 Jul 2006 17:39:20 -0000       1.6
+++ python.hpp  13 Jul 2006 08:16:55 -0000      1.7
@@ -22,6 +22,7 @@
 # include <boost/mpl/next.hpp>
 # include <boost/mpl/begin_end.hpp>
 # include <boost/mpl/not.hpp>
+# include <boost/mpl/empty.hpp>
 # include <boost/python/def.hpp>
 # include <boost/python/make_constructor.hpp>
 # include <boost/python/to_python_converter.hpp>
@@ -355,7 +356,7 @@
       {}
 
       template <class F>
-      void def(F f, int const*) const
+      void def(F f, not_specified const*) const
       {
           cl.def(name, f);
       }
@@ -593,7 +594,13 @@
     }
 
     template <class Class>
-    void visit(Class& cl) const
+    void visit_aux(Class& cl, mpl::true_) const
+    {
+        cl.def(boost::python::init<>()[call_policies]);
+    }
+
+    template <class Class>
+    void visit_aux(Class& cl, mpl::false_) const
     {
         typedef typename mpl::transform<
             ParameterSpecs
@@ -617,6 +624,12 @@
         );
     }
 
+    template <class Class>
+    void visit(Class& cl) const
+    {
+        visit_aux(cl, mpl::empty<ParameterSpecs>());
+    }
+
     CallPolicies call_policies;
 };
 



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to