From: Felipe Magno de Almeida on
On Aug 12, 4:36 am, "Johannes Schaub (litb)" <schaub-johan...(a)web.de>
wrote:
>

[snip]

> And it has the same example with the "+" and says a diagnostic shall be
> generated. Now, it seems the standard's body just took this paragraph and
> reworded it to allow accepting "syntactically ill-formed template
> definitions", whatever that might be. :) Apparently, people are very open to
> what can be left without diagnostics - your compiler for instance seems to
> accept a TU solely consisting of "%+*!^~" without emitting a diagnostic. I
> always wanted a compiler that doesn't moan all that much at me, great!

I do prefer one that checks as much as it can. That easies testing
every
template my library might contain.

> --

--
Felipe Magno de Almeida


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

From: Walter Bright on
Felipe Magno de Almeida wrote:
> I do prefer one that checks as much as it can. That easies testing
> every template my library might contain.


I'd argue that a template test suite is pitifully inadequate if it
doesn't, at a
bare minimum, try to instantiate each template.

What you need is a coverage analyzer, which will tell you which lines of
code
(including lines in template definitions) that are never executed.

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

First  |  Prev  | 
Pages: 1 2 3 4 5 6 7 8
Prev: basic concatenation question
Next: type casting issue