This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: templace abuses
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: François Dumont <francois dot cppdevs at free dot fr>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 3 Dec 2010 11:22:54 +0000
- Subject: Re: templace abuses
- References: <4CF80ABD.8010907@free.fr> <4CF8CDC3.5030800@oracle.com>
On 3 December 2010 11:00, Paolo Carlini wrote:
> On 12/02/2010 10:08 PM, François Dumont wrote:
>> Hi
>>
>> ? ? This is a patch following discussion thread about issue when
>> building tests in debug mode with C++0x mode.
>>
>> ? ? ?I introduce new utilities to check different iterator types and
>> add necessary operator overloads for move iterator. No problem
>> detected on reverse iterator.
> Excellent job. Patch is Ok but I would suggest using a less poetic word
> instead of 'template_abuse' in the actual names, maybe
> 'templated_iterator_operators'? Jon, works for you in real English?
Hmm, the operators in testsuite_template_abuse.h aren't meant to be
for iterators though, are they?
If I understand the problem, it's that greedy operators intended for
other types interfere and get applied to iterators - so calling them
iterators_ops is misleading.
How about <testsuite_greedy_ops.h> ?
Also, namespace N and struct X in that header could be named better -
short names are ok in a .cc test but a header included from many files
has more chance of name collisions. I would suggest maybe namespace
ops, greedy or greedy_ops. If the namespace changes then I think X is
probably OK.
Thanks for fixing this problem, François.
Jonathan