From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-11-02 11:58:38
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
> 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
> > different semantic interfaces. I agree with that.
> They are different. In the non-template case, consider T == auto_ptr<X>.
> the template case, consider what happens when the function is invoked with
> 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
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)