Re: expected_function

Joel de Guzman <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hi Frank,

Wonderful!

On 06/07/2016 10:59 PM, Frank Hein wrote:

> I prepared the PR so far. There are some issues left which I would like to discuss
> before I actually raise the PR to make sure it is acceptable. Here is what I did.
>
> 1. Moved the directive to the qi namespace. Tested, ok.
>
> 2. Registered expect as a common terminal in spirit (home/support/common_terminals.hpp)
>   This introduced an issue, because the qi expectation operator's > implementation is
>        in a struct called 'expect'. To fix this, I reordered the headers in home/qi.hpp.
>   The operator.hpp is now included first and then the directive.hpp. Works.
>
>        Obviously the cleanest solution would be to change the expectation operator's struct
>   to 'expect_operator' which would make header reordering obsolete.
>
>   This is not likely to break client code. But if one derived a class from expectation
>   operator's expect struct, this could break. I can not imagine any reason why one could
>   have done that. The
>
>  Please advice.

Do it! :-) As long as it's not in the public docs (is it?) it is fair game
to change.

> 3. Created test code and introduced it to according jamfile. Tested, ok.
>
> 4. Created forwarding header qi_expectd.hpp in include. Forwards to
> home/qi/directive/expect.hpp.
>
> 5. Created example code and introduced it to according jamfile.
>
>    I took the example from my qitoo repo. Do we actually need that example code? There is no
>   example code demonstrating the expectation operator. And the expect directive is somewhat
>   self-explaining, so fmo we don't need this.

That is not absolutely necessary. What you can probably do is tweak
one of the examples, using this directive instead.

> 6. Created documentation by adding the expect directive doc to doc/qi/directive.qbk.
>
>    I have got at problem to produce html output of that. When I bjam --v2 --enable-index the
>    documentation, only a spiritv2.boostbook gets produced, not the final html. Do you have
>   an idea, what I am missing here?

It's been a while since I've done QuickBook. I think it's best to ask the
Boost Documentation list for that.

> So, I learned a lot about the Boost build environment. :)

Wonderful! Thank you very much for doing this. I really appreciate it!

Cheers,
-- 
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.