Boost logo

Boost :

Subject: Re: [boost] Boost.Fiber review January 6-15
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2014-01-07 13:49:53


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Oliver Kowalke
> Sent: Tuesday, January 07, 2014 6:35 PM
> To: boost
> Subject: Re: [boost] Boost.Fiber review January 6-15
>
> I think, as a minimum, all the examples need to appear verbatim in
> > the docs
>
> the complete code? I would prefer only code snippets - the complete code be read in the example
> directory. otherwise the documentation would be bloated (at least I would skip pages of code).

It's easy to use Quickbook snippets for this key bits in the text

*and* then a link to the complete code in /example.

[@../../example/my_example.cpp]

You can often have more than one snippet from the source code example.

//[my_library_example_1
code snippet 1
...
//] [my_library_example_1] // This ends the 1st snippet.

//[my_library_example_2
more code snippet 2
...
//] [my_library_example_2] // This ends the 2nd snippet.

Providing sample output from the example is also sometimes useful.

I have done this by pasting (part?) output into a comment at the end of the example .cpp

/*
//[my_library_example_output

//`[* Output from running my_library_example.cpp is:]

  my_library_example.vcxproj -> J:\Cpp\my_library_example\Debug\my_library_example.exe
  Hello World!

//] [my_library_example_output] // End of output snippet.

*/

HTH

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk