ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
RE: [C++-sig] Re: Automatic downcast question
by Stefan Franke other posts by this author
Jun 15 2003 8:33PM messages near this date
Re: [C++-sig] Re: Documentation suggestion | [C++-sig] Re: Automatic downcast question
>  -----Original Message-----
>  From: c++-sig-admin@[...].org [mailto:c++-sig-admin@[...].org]On
>  Behalf Of David Abrahams
...

>  I think it's reasonable to try to convert directly to the actual type
>  of the pointee (C), but I don't think it's reasonable to try
>  downcasting to every known derived class of the pointee's static type.

But "every known derived class" is not what I was asking for. Rather
"the lowermost class on the inheritance graph from the pointee's static
type to its actual type that has been registered to BPL via bases<> ".
(Sorry if my English is weird).

This is typically exactly one class (B), unless with diamond-shaped
inheritance. In this case a non-ambivalent base class could be chosen.


>  We could consider implementing that as a new return value policy,
>  though, so you can ask for it when you need it.

Another option (at least for me) would be to be able to dynamically
cast a wrapped A to a wrapped C instance. Is that possible?






Stefan Franke
www.ableton.com
Attachments:
unknown1

Thread:
Stefan Franke
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved