|
Boost Users : |
Subject: Re: [Boost-users] Documentation for Boost Range
From: Christian Aichinger (Greek0_at_[hidden])
Date: 2016-05-19 01:10:38
On 18.05.2016 11:23, Paul A. Bristow wrote:
> I'm surprised that you think it can't be done with the current Boost docs and examples system,
> but I haven't looked at it in detail.
The complication here is the Boost Range adaptors. They have two
syntaxes (function call and pipe) that I generate from a single source
file[0]:
std::cout << "Reversed abc: "
<< PARENWRAP(CALL0(boost::adaptors::REVERSE,str))
generates two files, one with
std::cout << "Reversed abc: "
<< boost::adaptors::reverse(str)
and one with
std::cout << "Reversed abc: "
<< (str | boost::adaptors::reversed)
Ideally, I would like to keep it that way, for DRY reasons and to make
sure the call/pipe examples stay symmetric, so people can compare what
difference the two syntax makes. I don't know how to do that with bjam
alone.
Further, I would like to compile and run the examples, and compare them
against pre-recorded output to make sure output is as intended, and that
code/output are in sync. The difficult part here is the file-diffing,
which I don't really know how to do in bjam alone without calling
external programs. Might be possible though.
If anyone has ideas how to handle these two challenges, it'd be great to
hear about them!
Regards,
Chris
[0]:
http://github.com/Grk0/boost-range-for-humans/blob/master/src/reversed.cpp
https://greek0.net/boost-range/boost-adaptors-reverse.html
https://greek0.net/boost-range/boost-adaptors-reversed.html
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net