|
Boost : |
From: Rainer Deyke (root_at_[hidden])
Date: 2002-02-06 17:25:31
----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 06, 2002 12:50 PM
Subject: Re: [boost] Re: Policy-based vector? [was: Submission:
Fixed-Capacity STL Containers Library]
> The closest we can currently come to a templated typedef is to use a
type
> generator.
>
> template <typename A>
> struct specific { typedef generic<A,int> type; };
>
> // then usage is: typename specific<A>::type
>
> Personally, I don't find type generators all that bad. I'd be happy
with
> using them all over the place until we get templated typedefs into
the
> language. Do other people feel differently?
The problem with type generators is that they change the interface
when applied retroactively. The only way to prevent this is to never
use template classes directly, and that can get very verbose.
-- Rainer Deyke | root_at_[hidden] | http://rainerdeyke.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk