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 >> boost
boost
Re: [boost] Re: Upcoming changes to shared_ptr
by Peter Dimov other posts by this author
Nov 17 2002 10:04PM messages near this date
[boost] Re: Re: Upcoming changes to shared_ptr | Re: [boost] Re: Upcoming changes to shared_ptr
From: "Eric Woodruff" <Eric.Woodruff@[...].com> 
> 
>  "David Abrahams" <dave@[...].com> wrote in message
>  news:uvg2w6j80.fsf@[...]..
>  > "Peter Dimov" <pdimov@[...].net> writes:
>  >
>  > > * shared_*_cast will be renamed to sp_*_cast.
>  >
>  > Why? Without rationale, this seems like a gratuitous change,
>  > especailly since "sp" doesn't mean much to me.
>  >
> 
>  Agreed. "sp" is so wonderfully expressive. Actually, I was going to voice
a
>  complaint of that, but the ideal would overload dynamic_cast, but since it
>  is a language keyword, that can't happen. So I can kind of see sp_ as a
>  work-around for that.

True, but consider also that dynamic_cast has a different interface:

template<class Target, class Source>  Target dynamic_cast(Source);

so even if we could overload it, the syntax would have been

shared_ptr<Y>  py;
shared_ptr<X>  px = dynamic_cast< shared_ptr<X> >(py);

>  Alternatively, it could be named boost_dynamic_cast
>  and put in the global namespace, where it can be overloaded as needed by
>  boost.

This doesn't look too good if you consider the possible boost-> std
transition. :-)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Peter Dimov
Peter Dimov
Dirk Gerrits
hugo duncan
Peter Dimov
David Abrahams
Peter Dimov
Peter Dimov
Eric Woodruff
Peter Dimov
David Abrahams
Peter Dimov
David Abrahams
Eric Woodruff
David Abrahams

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