Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

Documentation is a reference, not a novel. If someone looked up the
documentation for "bar", why make them jump over to "foo" (and make sure
they know to do so) to see bar's examples?

Then there better are two examples, one focused on foo and the other on bar. Anyway, I don't see the need for such a feature. All I want is to have certain unittests appear in the generated documentation.

Consider fopen and family - would you not say that an example like the
below is good enough for both fopen and fclose?

FILE* pFile;
pFile = fopen( "myfile.txt", "w" );
if ( pFile != null ) {
    fputs ("fopen example",pFile);
    fclose (pFile);
}

--
Simen

Reply via email to