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

David Abrahams dave at boost-consulting.com
Fri Jul 4 00:14:05 CEST 2003


Nikolay Mladenov <nickm at sitius.com> writes:

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

Thanks, sounds perfect.  As you could probably tell from working on
it, that approach fell right into all the "slots" I'd left in the code
for you (well me, really, but I never got around to it -- so thanks!)

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





More information about the Cplusplus-sig mailing list