[C++-sig] How to use make_default with keyword expression

Johan Råde johan.rade at gmail.com
Sun Feb 19 09:46:05 CET 2012

The following code works fine:

     using namespace boost::python;

     class X {};

     X* make_X(int n, float f) { return new X; }

             //,(arg("n"), arg("f") = 1.0f)

But if I uncomment the commented line, then the code does not compile.
How do I fix that?

More information about the Cplusplus-sig mailing list