Subject: Re: [boost] [spirit] Support for one-pass iterators?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-10-19 10:24:07
Christian Schladetsch wrote:
> On Tue, Oct 20, 2009 at 3:06 AM, Andrey Semashev
> > Christian Schladetsch wrote:
> >> Sure, but this is basic C++. Before the ctor to
> >> grammar(...) is invoked, the
> >> arguments to it have been evaluated. This requires
> >> construction of its arguments.
> > That is not true. The base class constructor is called
> > _before_ any members are constructed. Try it yourself.
> I am not sure what you are referring to. Before the C++
> compiler passes a
> reference to something, it has constructed it. The example
> you gave was of a
> ctor taking a reference. Before that ctor is executed, I will
> guarantee that it and all it's base classes have been constructed.
You can pass a reference to a data member to a base class constructor in a derivate's initializer list. If the base class constructor tries to use the reference, it will result in undefined behavior. (I'm not commenting on the supposed Spirit problem suggested by the OP.)
> You are working under a delusion that should be corrected very soon.
I think you're jumping to conclusions.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk