|
Boost : |
From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2003-12-10 13:01:51
"Reece Dunn" <msclrhd_at_[hidden]> writes:
> David Abrahams wrote:
[snip]
>> Actually on compilers where it's needed, it seems to be safe (and
>> occasionally neccessary) to use it everywhere except in the place
>> labelled OK above. We really ought to change it to BOOST_TYPENAME.
> I think the name should be kept - it is already in use, so changing it may break
> a lot of code.
I would imagine that this change could be made in all of both boost
code and documentation using a simple search and replace. E. g.:
find -type -f -exec sed -i \
-e 's/BOOST_DEDUCED_TYPENAME/BOOST_TYPENAME/g' '{}' \;
Otherwise, #define BOOST_DEDUCED_TYPENAME BOOST_TYPENAME could be added
temporarily after the change is made.
> Also, the name indicates the use of typename in the
> BOOST_DEDUCED_TYPENAME T::type type context, signifying meaning.
But the name is misleading when used in other contexts.
>> ( this might be another reason to write template<class T> ;-> )
> Here would be a good use for a BOOST_TYPENAME, that becomes typename for
> compilers that support it, and class for those that don't. Thus, my example
> would become:
[snip]
What is the advantage in typing "BOOST_TYPENAME" when it would _always_
be semantically equivalent to "class"?
-- Jeremy Maitin-Shepard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk