[C++-sig] Automatic support for operator and operator()
dave at boost-consulting.com
Sat Nov 16 03:33:49 CET 2002
"Joel de Guzman" <djowel at gmx.co.uk> writes:
> ----- Original Message -----
> From: "David Abrahams" <dave at boost-consulting.com>
>> Regarding the function-call example, I don't think the above provides
>> significant benefit over the existing facilities for defining
>> "__call__". However, it did get me thinking: we don't need to specify
>> the return type in these operator expressions; maybe our
>> BOOST_PYTHON_[MEMBER]_FUNCTION_OVERLOADS() macros should take
>> advantage of the same techniques so that users don't have to supply
>> the return type of their overload set(s). I'm not sure there's much to
>> be gained here, but it's worth a thought.
> Hmmm. Perhaps I'm still sleepy "-}, but what technique were
> you referring to?
Whatever technique allows us to infer the return type ;-)
See the use of convert_result<> in operators.hpp.
dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
More information about the Cplusplus-sig