Boost logo

Boost :

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
you would
> 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
other case
> (you write code for yourself) you would know what kind of smart_ptr
to use
> for Widget. At least you would remember to use SharedWidgetPtr you
wrote for
> yourself.

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
their own
> smart pointer on widget. That again could either fail to compile,
work if
> 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, gregod at, cpdaniel at, john at