Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-29 21:37:17


"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
news:aaktte$jev$1_at_main.gmane.org...
> "Gennadiy Rozental" <rogeeff_at_[hidden]> wrote in message
> news:aakst6$i02$1_at_main.gmane.org...
> > "Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message
> > news:aakk4t$613$1_at_main.gmane.org...
> >
> > [...]
> > > 3. Put the specialized trait in a separate file, and ask everyone who
> > wants
> > > to use Widget to include that file. This is a discipline-based
approach
> > and
> > > therefore is error-prone.
> > >
> > Here I disagree with you. Even if you have a third party Widget class
(in
> > other case you just put specialization there) you could always provide
> > WidgetPtr.h header and use it everywhere instead of Widget.h. I do not
see
> a
> > big problem with that.
>
> I'd agree if the code would not compile. But there is a big problem:
whether

It won't it users will use distinct type like SharedWidgetPtr. Users could
use Widget* directly but it is the case with the policy-based solution
either. "Might even link and run in certain cases!"

> you include widget.h or widgetptr.h, the code compiles. Might even link
and
> run in certain cases! Therefore, the error introduced would be very very
> subtle.
>
> I see the problem as huge, not big.
>
>
> Andrei
>

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk