Boost logo

Boost Users :

From: Jens Theisen (jth02_at_[hidden])
Date: 2006-09-14 14:33:31


Joel de Guzman <joel_at_[hidden]> writes:

> Well, the proper mailing list is:
> https://lists.sourceforge.net/lists/listinfo/spirit-general

It also fits very well into this thread.

> Yeah. You did miss something. The closure members can be initialized.
> See "Initializing closure variables" section in http://tinyurl.com/85hbq

And, to stick with my example, what would be a good initialisation for
a plus_expression?

You don't want to replace default construction with a copy from what's
conceptionally a default. The topic question of this thread is about
whether or not you should construct objects prior to when you have
enough information to meaningfully do so, and for returning parsed
values in spirit, this is neither at closure contstruction time nor at
rule/grammar invocation time.

I have the impression that spirit either forces you to do exactly that
or else use actions, which is even more messy.

Am I correct in that observation?

Best regards,

Jens


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