Prev: basic concatenation question
Next: type casting issue
From: Felipe Magno de Almeida on 12 Aug 2010 04:51 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 12 Aug 2010 23:18
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! ] |