
Christian Schladetsch wrote:
On Tue, Oct 20, 2009 at 3:36 AM, Andrey Semashev <andrey.semashev@gmail.com>wrote:
Christian Schladetsch wrote:
I'll bet that you are calling a virtual method from a base class's initialiser list, and blaming it on Boost.Spirit...
On Tue, Oct 20, 2009 at 3:12 AM, Christian Schladetsch < christian.schladetsch@gmail.com> wrote:
You can, of course, make a situation where you can pass a reference to a
malformed instance.
Please, don't guess. I described the case in one of my previous postings:
http://article.gmane.org/gmane.comp.lib.boost.devel/194839
The docs I am referring to are here, for example:
http://svn.boost.org/svn/boost/trunk/libs/spirit/doc/html/spirit/notes/porti...
http://svn.boost.org/svn/boost/trunk/libs/spirit/doc/html/spirit/qi/tutorial...
and some other places.
Before I spend an hour researching the pathology of this ''bug":
Am I right in assuming that the poster was complaining about Boost.Spirit using a malformed instance? An instance that was passed to it by
reference?
If so, I stand by all the facts I stated about said instance being
created
before being passed.
If not, then there is more going on than I originally assumed, and I will henceforth bow out of the issue. But I remain interested in whether the caller can blame the callee in any case such as:
void foo(X& x) { x.bar(); }
If you read carefully the post I gave link to, the answer should be clear. The library docs suggest the usage pattern that is invalid with the current state of code. It is possible to make user's code compatible with the library implementation (by using base-from-member idiom), but (a) this requirement is not documented and (b) this complicates the code. Point (b) is especially significant for me as I'm considering to upgrade from Spirit 1.8 to 2.