Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-11-02 11:58:38


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:007c01c2827a$2a0c37e0$1d00a8c0_at_pdimov2...
> From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> > "David Abrahams" <dave_at_[hidden]> wrote in message
> > news:uiszghmba.fsf_at_boost-consulting.com...
> > > And, BTW, techniques like Mojo are not transparent. They /do/ affect
> > > interface in subtle ways.
> >
> > That's true; however, Kevin's point is that Foo(T) and Foo(const T&) are
> not
> > different semantic interfaces. I agree with that.
>
> They are different. In the non-template case, consider T == auto_ptr<X>.
In
> the template case, consider what happens when the function is invoked with
a
> function/array parameter. (String literals are arrays.)

You are right. I amend my statement with "... in the case T is a value
type". That means, value semantics, no run-time polymorphic type, no special
type.

To change the subject: as you yourself showed me, Fun(const auto_ptr<T>&) is
not very useful because you can't pass a temporary auto_ptr<T> to it... :o)

Andrei


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