[C++-sig] () and [] operators

David Abrahams dave at boost-consulting.com
Tue Nov 12 18:37:00 CET 2002


Kerim Borchaev <warkid at hotbox.ru> writes:

> Hello again.
>
>   I wasn't able to find an "intuitive"(like for other operators) way to expose () and []
>   operators. How am I supposed to do it?

Gee, it sure would be nice to do it automatically, wouldn't it?
In the meantime, you can add '__call__', '__getitem__', and
'__setitem__' methods as you would in Python.

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution





More information about the Cplusplus-sig mailing list