------- Additional Comments From gdr at integrable-solutions dot net
2005-08-12 09:44 -------
Subject: Re: can't compile self defined void distance(std::vector<T>,
std::vector<T>)
"adah at netstd dot com" <[EMAIL PROTECTED]> writes:
| > you still fail to provide such a definition for "interface".
| > -- Gaby
|
| Why should I?
Because, it is *you* who brought that topic in this discussion.
| Herb defined it in Exceptional C++, Item 32:
|
| For a class X, all functions, including free functions, that both
|
| * `mention' X
| * are `supplied with' X
|
| are logically part of X, because they form part of the interface of X.
That definition bans std::swap as currently usable
with std::complex<double>, e.g.
std::complex<double> w, z;
swap(z, w);
You would have hard-time convincing me that I want that behaviour for
standard C++, let alone GCC. Furtheremo more, you have to define
"supplied with". If N gives me
namespace N {
struct X { };
}
and M adds
namespace M {
using N::X;
f(X);
}
is M::f part of N::X's interface?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15910