> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 29, 2007 9:38 PM
> To: [email protected]
> Subject: Re: [PATCH] dynatype.cpp example and MSVC
>
[...]
> > The dynatype::operator= (const dynatype::map<void>&)
> removed because it's never used.
>
> Could it ever be used? Imagine dynatype being a general class
> provided by a library. Does there exist a valid use case for
> this operator? If not, I have no problem with removing it.
> Otherwise, if it doesn't break anything, let's keep it.
The dynatype::map<void> type is a private type. So that operator= can
be used
only within any member of the dynatype class. So that operator= should
be invoked
using following code:
*this = [some variable of dynatype::map<void> type];
But that "*this = ..." code used only in two places:
1. in dynatype::dynatype<dynatype::map<void> > (const
dynatype::map<void> &t);
that constructor cannot be invoked because of dynatype::map type is
private.
2. in template <class T> void dynatype::copy (const dynatype &rhs); with
T = dynatype::map<void>
but there exist an empty specialization for that T:
template <>
inline void dynatype::copy<dynatype::map<void> >(const dynatype&)
{ /* no-op */ }
If we would replace the dynatype::map<void> specializations to the
void specializations,
we cannot keep the dynatype::operator= (const dynatype::map<void>&)
because of
that operator after the replacement would be dynatype::operator= (const
void&), but
that syntax is incorrect.
Farid.