Boost logo

Boost :

From: Noah Stein (Noah_at_[hidden])
Date: 2002-10-30 16:56:04

> Kevin S. Van Horn:

> Does it matter to the user whether the signature of f is
> "void f(foo_t)" or "void f(foo_t const &)"? As the implementor of f, I
> might like to have the freedom to switch between the two signatures
> depending on whether or not I need a copy of the argument.

Isn't a function signature in the API part of the interface and not the
implementation? I would think that whether an object is copy constructed or
not would have an influence on what you pass in to the function. I know
that it would make a very big difference for me in the products I work on.
Anything large that I wanted to pass into f would almost be required to be
behind a handle or smart pointer of some sort. Since the original signature
didn't take a const foo_t, I'd also want to ensure that it supported some
kind of COW, unless I'm multi-threading then maybe I don't want COW. I
really think that the full signature of a function is interface not

-- Noah

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