[C++-sig] range with virtual functions
David Abrahams
dave at boost-consulting.com
Sun Apr 8 16:27:05 CEST 2007
on Wed Mar 28 2007, Piotr Jaroszynski <p.jaroszynski-AT-gmail.com> wrote:
> Hello,
>
> I have yet another "problem" :] I want to expose a begin_foo and end_foo
> functions as an iterable object like:
> .add_property("foo", range(&Blah:begin_foo, &Blah::end_foo))
>
> How can I do it when begin_foo and end_foo are virtual functions? I am
> interested in both cases, when they are pure virtual and virtual with
> default implementation.
>
> TIA for help!
You don't need to do anything special. Just expose them as above.
Boost Consulting
www.boost-consulting.com
Don't Miss BoostCon 2007! ==> http://www.boostcon.com
More information about the Cplusplus-sig
mailing list