Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2002-11-01 22:33:35

"David Abrahams" <dave_at_[hidden]> wrote in message
> 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. It is true that they are
different syntactic interfaces, and that if one is really nitpicky, there
are conceivable semantic differences in what you can do and what you can't
in each case. (For example, you can change the exceptions thrown if you
create the copy inside Foo.) My belief, however, is that the semantics are
identical beyond reasonable concern.

(This discussion is independent of Mojo. I believe the advice to
***consider*** replacing Foo(const T&) with Foo(T) if you plan on making a
copy of T inside Foo is valid regardless on whether you implement the Mojo
protocol or not.)

(In case mojo is unfamiliar to anyone:


Boost list run by bdawes at, gregod at, cpdaniel at, john at