From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-04-30 00:58:33
"Gennadiy Rozental" <rogeeff_at_[hidden]> wrote in message
> 1. You are using some third party library (Widget). In other case
> just put you specialization into Widget header.
Modifying the headers of a third-party libraries is not something
recommendable as a programming technique. I assume widget.h was
defined by the writers of that library.
> 2. You code is used as third party library by somebody else. In
> (you write code for yourself) you would know what kind of smart_ptr
> for Widget. At least you would remember to use SharedWidgetPtr you
Makes sense, but what to do if users employ class declarations to
minimize compile-time dependencies? That is a good technique
recommended by all experts.
> 3. Users of your library for some reasons ignore your interface
> contain SharedWidgetPtr. in other case if SharedWidgetPtr is
> detail user of your library should not bother at all) and define
> smart pointer on widget. That again could either fail to compile,
> SharedWidgetPtr smart enough to properly convert into some other
> I should work also because SharedWidgetPtr is in you interface and
> specialization will also be there.
I don't understand the situation you describe.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk