[C++-sig] Re: (return_self_policy / return_arg): Keywors

Nikolay Mladenov nickm at sitius.com
Tue Jul 1 00:36:39 CEST 2003


Oh, and I meant to explain a bit of how it works.

case 1. init<optional<> > and def(*,*, overloads()) define overloaded
functions with fixed arity,
meaning that m_min_arity == m_max_arity for each of them. When a call is
made that has 
nargs == overload.m_min_arity == overload.m_max_arity, the overload
proceeds

case 2. When args are used only one overload is created and in general
it will have m_min_arity != m_max_arity,
based on how many arguments have default values. When a call is made
that matches this (m_min_arity,m_max_arity)
range then the default args are used to fill in the blanks to
m_max_arity, and only if this is possible the overload proceeds.





More information about the Cplusplus-sig mailing list