Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-21 15:37:55

----- Original Message -----
From: "rwgk" <rwgk_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, January 21, 2002 2:40 PM
Subject: [boost] Re: Classification of template typename labels?

> --- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> David Abrahams wrote:
> > The library provides the dispatching function:
> >
> > template <class X, class Y>
> > void copy(X x1, X x2, Y y)
> > {
> > copy(typename concept<X>::type(), x1
> > , typename concept<X>::type(), x2
> > , typename concept<Y>::type(), y);
> > }
> >
> This looks very interesting in its own right. However, this
> does not seem to address Howard Hinnant's problem (correct?):
> Howard Hinnant wrote:
> > As a library writer I would like to be able to create a restricted
> > template foo that would accept only (for example) arithmetic types.
> But
> > if client code creates a function foo that takes a user-defined
> type, I
> > want it to behave as if there is no template foo, even if he has
> brought
> > it into scope.


> But I guess smart use of namespaces could help here.

It's not clear. I think Howard wants people to be able to freely and
reliably mix uses of functions with the same name from different namespaces.
Though it would be wonderful, I have doubts that it's possible. IMO, for
reliability, a user has to be explicit about which namespace's semantics he
is implementing for a given function name.

> "typeof" does not appear in the ISO standard. How can I learn
> more about this?

Check CodeWarrior or GCC documentation.


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