|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-02-07 13:59:54
At 08:49 PM 2/6/2002, Douglas Gregor wrote:
>On Wednesday 06 February 2002 08:15 pm, you wrote:
>> What is wrong with forwarding classes (until typedef templates make it
>into
>> the language)?
>>
>> template <typename T>
>> struct specific_a : public generic<T, policy_a>
>> { ... forwarding ctors, etc. };
>>
>> template <typename T>
>> struct specific_b : public generic<T, policy_b>
>> { ... forwarding ctors, etc. };
>>
>> At the cost of having to write and maintain more code, doesn't the
above
>> simulate:
>>
>> template <typename T>
>> typedef generic<T, policy_a> specific_a;
>>
>> template <typename T>
>> typedef generic<T, policy_b> specific_b;
>>
>> Or am I missing something?
>>
>> --Beman
>
>The problem is almost entirely a maintenance problem, because it can
>require a huge amount of maintenance. This is the way Boost.Function
>works, and it has been a maintenance nightmare....
I don't doubt that for a moment. Might be an interesting data point to
report to the committee.
I hope someone will submit a typedef template proposal to the committee
soon. My guess is that at least some compiler suppliers will implement it
fairly quickly, once it looks like the details start to settle.
(Remember that the C++ standards committee is like Boost - an all volunteer
operation. So if no one writes a proposal, nothing happens. No matter how
much everyone agrees something is a good idea.)
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk