ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] Virtual Methods + default arguments
by David Abrahams other posts by this author
Feb 26 2003 4:47AM messages near this date
[C++-sig] Virtual Methods + default arguments | Re: [C++-sig] Virtual Methods + default arguments
Bruno da Silva de Oliveira <bso@[...].br>  writes:

>  Hi!
> 
>  Is it possible to indicate default arguments for virtual methods,
>  using the BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS macro?
> 

<snip> 

>  I also tried to change the second .def to:
> 
>     .def("f", &XWrap::f, f_overloads())
> 
>  and:
> 
>     .def("f", &XWrap::default_f, f_overloads())
> 
>  But with the same results.

This one is on the right track, but you need a separate version of
f_overloads for the second one.  The 2nd argument to def in this case
just carries type information; it could be a null function pointer
for all Boost.Python cares.  It's the 3rd arg which carries all the
info about what functions to call.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com


_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Bruno da Silva de Oliveira
David Abrahams
Nicodemus

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved