templace abuses

Jonathan Wakely jwakely.gcc@gmail.com
Fri Dec 3 11:23:00 GMT 2010

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.


More information about the Libstdc++ mailing list